其他资源(例如 EC2)可以毫无问题地创建,但无法创建 PublicRead s3 存储桶。
Resources:
MyS3Bucket:
Type: AWS::S3::Bucket
Properties:
BucketName: helloworldwebsite
AccessControl: PublicRead
WebsiteConfiguration:
IndexDocument: index.html
命令是:
aws cloudformation create-stack --stack-name myteststack --template-body "file:///path/to/S3-template.yaml"
这是 CloudFormation / Stacks 的屏幕截图:
