Error creating S3 Bucket (bucketname): AccessDenied: Access Denied

Hi All,

I’m using Terraform V1.1.3 and AWS V4.7.0
While creating S3 bucket, I’m getting AccessDenied error.
Error Message:
Error: error creating S3 Bucket (test123): AccessDenied: Access Denied
│ status code: 403, request id: VJW34VNDQN47QF9D, host id: EKL8Z96aUz9THewz49PzoHzSjWdneTWdThbdSainjrFIaGYJkJh0eAljQLzxbliOE8Z9EyQeCOA=

│ with aws_s3_bucket.b,
│ on main.tf line 13, in resource “aws_s3_bucket” “b”:
│ 13: resource “aws_s3_bucket” “b” {

Note: I’m able to create S3 bucket via AWS portal and AWSCLI.

Thanks in Advance.

Regards,
Santosh

Please check whether the user have the access(role policy) to create the S3 via terraform.