BucketUser:
Type: AWS::IAM::User
Properties:
PolicyName: InTheBucket
PolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Action:
- s3:GetObject
- s3:PutObject
- s3:PutBucketCORS
- s3:PutObjectAcl
Resource: arn:aws:s3:::flask-Bucket
BucketKey:
Type: AWS::IAM::AccessKey
Properties:
Username:
!Ref BucketUser
Outputs:
WebsiteURL:
Value: !GetAtt S3Bucket
Export:
Name: S3Bucket
BucketKey:
Value: !Ref BucketKey
Export:
Name: BucketKey
SecretAccessKey:
Value: !GetAtt BucketKey.SecretAccessKey
Export:
Name: SecretAccessKey
Error name : Template error: if specifying one argument to Fn::GetAtt,
that argument must be a non-empty string in format <LogicalId>.<Attribute>.
我一直在引用此。
检查 AWS::S3::Bucket
对于WebsiteURL
输出,请尝试:
WebsiteURL:
Value: !GetAtt S3Bucket.WebsiteURL
Export:
Name: S3Bucket