【发布时间】:2021-07-15 02:51:05
【问题描述】:
我正在尝试编写 CloudFormation 模板来配置具有智能层配置的 AWS S3 存储桶,并且已阅读 AWS::S3::Bucket IntelligentTieringConfiguration 链接。但是不清楚在 YAML 文件中的位置。
我有一个模板文件,并运行 AWS CLI 命令
$ aws cloudformation create-stack --stack-name test-s3 --template-body file://test-s3.yaml --region us-east-1
我试过了
Description: AWS Cloudformation template to create S3 buckets
Resources:
S3Bucket0:
Type: AWS::S3::Bucket
DeletionPolicy: Retain
IntelligentTieringConfiguration:
Id: Tier1
Status: Enabled
Tiering:
- ARCHIVE_ACCESS
...这会立即从 AWS CLI 给出此错误。
An error occurred (ValidationError) when calling the CreateStack operation: Invalid template resource property 'IntelligentTieringConfiguration
...或...
Description: AWS Cloudformation template to create S3 buckets
Resources:
S3Bucket0:
Type: AWS::S3::Bucket
DeletionPolicy: Retain
Properties:
IntelligentTieringConfiguration:
Id: Tier1
Status: Enabled
Tiering:
- ARCHIVE_ACCESS
...在 AWS CloudFormation 控制台中出现此错误。
Encountered unsupported property IntelligentTieringConfiguration
那么正确的格式是什么?
【问题讨论】:
标签: amazon-s3 amazon-cloudformation