如何修改现有的Amazon Cloudfront分配?

时间:2018-08-27 13:20:56

标签: amazon-web-services amazon-cloudfront aws-cli

我正在尝试修改现有的Amazon Cloudfront发行版。它总是失败。为什么?

result = client.get_distribution(Id=env_vars['CLOUDFRONT_ID'])
etag = result['ETag']
existing_config = result['Distribution']['DistributionConfig']
existing_config['CallerReference'] = str(datetime.datetime.utcnow())

client.update_distribution(DistributionConfig=existing_config, Id=env_vars['CLOUDFRONT_ID'], IfMatch=etag)

结果

botocore.errorfactory.IllegalUpdate: An error occurred (IllegalUpdate) when calling the UpdateDistribution operation: You cannot update Origin or CallerReference.

0 个答案:

没有答案