amazon-web-services - S3 错误:使用嵌套堆栈部署 CFN 模板时访问被拒绝
问题描述
我正在尝试启动一个 CFN 模板化的嵌套堆栈。子堆栈与我试图通过 CFN 控制台启动的父堆栈位于同一区域的存储桶中。
我具有管理员访问权限,并且能够通过单个 CFN 模板创建资源,但由于某种原因,使用嵌套堆栈时会返回以下错误:
The following resource(s) failed to create: [My-Sns-Stack]. . Rollback requested by user.
My-Sns-Stack CREATE_FAILED S3 error: Access Denied For more information check http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html
我检查了以下资源,但没有解决问题:
部署 cloudformation 模板时指定 S3 存储桶
https://www.reddit.com/r/aws/comments/bjk3qw/cloudformation_nested_stacks_s3_access/
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stack.html
...
Resources:
SnsStack:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: !Ref SnsStackUrl
TimeoutInMinutes: 15
...
解决方案
我发现这个错误不太有用,因为我认为 CloudFormation 模板无法访问其中引用的 S3 资源。结果它更简单,“拒绝访问”错误实际上表明 S3 文件包含我的 CloudFormation找不到模板。在对我的嵌套 CloudFormation 堆栈的引用中,TemplateURL: 有一个错字。
推荐阅读
- python - 如何将图像加载到 RAM 以供以后在 .kv 文件中使用(Kivy+Python)
- marklogic - 从 JSON 中删除空属性
- html - 在 iphone 中使用谷歌字体的问题
- android - 错误:项目 ':app' 上的 Project#afterEvaluate(Closure) 无法在当前上下文中执行
- javascript - 如何根据数据库中数据的时间戳创建多个计时器或根据时间戳或时间延迟数据库的弹出
- apache-kafka - 为什么窗口化现在适用于 Kafka Streams?
- google-bigquery - 如何通过 Firebase 中的某些用户事件过滤 BigQuery 中的保留计算
- php - 相似时如何返回数组
- powerbi - 如何在 Power BI dax 中编写 excel 公式
- ssrs-2008 - 在 SSRS 中连接负数和字符串