Error Error putting object in S3 bucket example11225588 AccessDenied Access Denied

0 votes
Hello Guys,

I am trying to upload one file in the s3 bucket using terraform. But it is showing me the below error.
Jun 11, 2020 in Terraform by akhtar
• 38,260 points
2,965 views

1 answer to this question.

0 votes

Hi@akhtar,

To upload your file in the s3 bucket, you have to give permissions. So add your bucket policy in your code as given below.

resource "aws_s3_bucket_public_access_block" "example" {
  bucket = aws_s3_bucket.bucketman.id
  block_public_acls = false
  block_public_policy = false
}

Hope this will help.

answered Jun 11, 2020 by MD
• 95,460 points

Related Questions In Terraform

0 votes
1 answer

Error refreshing state: AccessDenied: Access Denied status code: 403

Hi@akhtar, I also faced the same issue. Then ...READ MORE

answered Sep 9, 2020 in Terraform by MD
• 95,460 points
13,398 views
0 votes
1 answer

How to create a folder in S3 bucket using terraform?

Hi@akhtar, You can use aws_s3_bucket_object resource to create one ...READ MORE

answered Jun 11, 2020 in Terraform by MD
• 95,460 points
11,013 views
0 votes
1 answer

How to create one S3 bucket in AWS using Terraform?

Hi@akhtar, You need to set aws provider name ...READ MORE

answered Jul 23, 2020 in Terraform by MD
• 95,460 points
1,423 views
0 votes
1 answer

How to block public access to S3 bucket using Terraform?

Hi@akhtar, To control the access of the S3 ...READ MORE

answered Sep 9, 2020 in Terraform by MD
• 95,460 points
13,731 views
0 votes
1 answer
+1 vote
2 answers
0 votes
1 answer
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP