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,170 points
909 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,180 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,180 points
2,992 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,180 points
3,061 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,180 points
309 views
0 votes
1 answer
0 votes
1 answer
+1 vote
2 answers
0 votes
1 answer
0 votes
1 answer