当我尝试使用terraform创建aws cloudfront时,收到以下错误消息。这只是练习的目的..
AWS错误消息
aws_cloudfront_distribution.s3_distribution: error creating CloudFront Distribution: AccessDenied: You don't have permission to access the S3 bucket for CloudFront logs: mylogs.s3.amazonaws.com If you're using IAM, you need s3:GetBucketAcl and s3:PutBucketAcl permissions to create a distribution or to update log settings for an existing distribution. In addition, the S3 ACL for the bucket must grant you FULL_CONTROL.
status code: 403, request id: ca2cb482-77ee-11e9-b657-333a65da9ea7下面是代码。
https://github.com/vaibhavjpr/terraformpractice/blob/master/cloudfront.tf
任何解决这个问题的提示都会对我很有帮助。
发布于 2019-05-17 06:40:28
我猜mylogs.s3.amazonaws.com不是你的S3 bucket,可能是有人在很久以前创建的。在亚马逊网络服务中,S3存储桶名称是唯一的,我建议您遵循以下official AWS S3 bucket naming practices。
https://stackoverflow.com/questions/56173031
复制相似问题