CloudFormation堆栈部署因S3 URL错误而失败

时间:2019-04-16 19:32:57

标签: amazon-cloudformation

通过S3存储桶部署CF堆栈模板。我正在创建存储桶,验证模板,打包模板并进行部署。当我这样做时,我收到有关S3存储桶URL的奇怪错误:

运行以下内容...

#Completes successfully. Container created.
aws s3 mb "s3://99af8f28" `
--profile 'dev' `
--region 'us-east-1'

#Completes successfully.
aws cloudformation validate-template `
--template-body file://./cf_template.cfn.yml `
--profile 'dev' `
--region 'us-east-1'

#Completes successfully. Package created and 
#uploaded to bucket.
aws cloudformation package `
--template-file .\cf_template.cfn.yml `
--s3-bucket '99af8f28' `
--output-template-file .\cf_template.pkg.cfn.yml `
--profile 'dev'

#Fails. See error below.
aws cloudformation deploy `
--template-file .\cf_template.pkg.cfn.yml `
--stack-name 'foobar' `
--capabilities CAPABILITY_IAM `
--profile 'dev' `
--region 'us-east-1' `
--s3-bucket '99af8f28'

#Completes successfully.
aws s3 rb "s3://99af8f28" `
--profile 'dev' `
--force

然后,出现以下错误:

  

调用CreateChangeSet操作时发生错误(ValidationError):S3错误:无法获取对象https://s3-us-west-1.amazonaws.com/99af8f28/fe6f7b676bc1f69dd0f88629c2d5e063.template

还有其他人能解决这个问题吗?

0 个答案:

没有答案