【发布时间】:2020-06-04 22:39:01
【问题描述】:
谁能告诉我我在这里做错了什么。我正在尝试强制 S3 存储桶使用我正在引用的 KMS 密钥,但 YAML 格式不正确。能给点建议吗。谢谢
TrailBucket:
Condition: InternalBucket
Type: 'AWS::S3::Bucket'
Properties: {
BucketEncryption:
ServerSideEncryptionConfiguration: *********
- ServerSideEncryptionByDefault:
SSEAlgorithm: !Ref Key
}
TrailBucketPolicy:
Condition: InternalBucket
Type: 'AWS::S3::BucketPolicy'
Properties:
Bucket: !Ref TrailBucket
PolicyDocument:
如果我删除括号 {},那么我会在 cloud-formation 中收到以下错误消息
The XML you provided was not well-formed or did not validate against our published schema (Service: Amazon S3; Status Code: 400; Error Code: MalformedXML; Request ID:
【问题讨论】:
标签: amazon-s3 yaml amazon-cloudformation