AWS更新Cloudfront域名

时间:2018-11-01 01:24:24

标签: amazon-web-services powershell amazon-cloudfront

我正在尝试使用Update-CFDistribution更新CloudFront发行中的Origins_Item,尤其是域名。

在此处查阅AWS Powershell参考之后:https://docs.aws.amazon.com/powershell/latest/reference/Index.html

这是我要使用的代码。

import pandas as pd
df = pd.DataFrame([List1, List2, List3]).T 
df.to_csv('your.csv', index=False)

但是我遇到以下错误:

$CloudFront = $(Get-CFDistribution -Id abc123def).DistributionConfig.Origins.Items
$CloudFront.DomainName = "test.example.amazonaws.com"
Update-CFDistribution -Origins_Item $CloudFront -Id abc123def

我对Powershell和AWS都是陌生的,因此将不胜感激。

1 个答案:

答案 0 :(得分:0)

似乎DomainNames属性的路径不正确。您能否参考此问题中提供的有效负载?
AWS cli query to get to cloudfront "Domain Name" with specific origin name

相关问题