【发布时间】:2019-10-03 23:54:26
【问题描述】:
当我尝试使用 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
任何解决此问题的提示都会对我很有帮助。
【问题讨论】:
-
我遇到了同样的错误。你做了什么来解决这个问题?
-
你解决了吗?
-
尝试一个随机名称以确保您没有使用已使用的存储桶,同时确保您可以访问该存储桶,以检查您是否可以创建具有公共访问权限的存储桶(只是为了确保您可以创建它,提醒:永远不要创建公共 s3 存储桶)
标签: amazon-web-services amazon-s3 terraform amazon-cloudfront terraform-provider-aws