1 Answer
- Newest
- Most votes
- Most comments
0
Hello.
I made the same settings as you in my environment and was able to upload successfully.
Is the permission to execute "PutObject" set in the IAM policy of the IAM user running AWS CLI?
Also, if you are performing operations as an IAM user, try changing the ARN to that of the IAM user as shown below.
{
"Version": "2012-10-17",
"Id": "ExamplePolicy01",
"Statement": [
{
"Sid": "ExampleStatement01",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::********:user/test"
},
"Action": "*",
"Resource": [
"arn:aws:s3:::<my Bucketlist name>",
"arn:aws:s3:::<my Bucketlist name>/*"
]
}
]
}
If the S3 bucket and IAM user belong to the same AWS account, you should be able to access it if the above bucket policy setting or IAM policy allows the operation.
Relevant content
- Accepted Answerasked a month ago
- AWS OFFICIALUpdated 19 days ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago