AWS S3 Transfer Acceleration scenarios with 'Access Denied' scenarios for Public Bucket
Does anyone know how to I'm trying to enable Transfer Acceleration for my Amazon S3 bucket, which is set to public access, but I'm working with an 'Access Denied' behavior when attempting to upload files using the accelerated URL. My bucket policy allows public access for GET requests but seems to be causing issues with PUT requests. Here's the bucket policy I'm currently using: ```json { "Version": "2012-10-17", "Statement": [ { "Sid": "PublicReadGetObject", "Effect": "Allow", "Principal": "*", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::my-public-bucket/*" } ] } ``` I enabled Transfer Acceleration in the S3 console and am using the following Python code to upload files via the accelerated endpoint: ```python import boto3 s3 = boto3.client('s3', region_name='us-east-1') def upload_file(file_name, bucket): s3.upload_file(file_name, bucket, file_name) upload_file('test_file.txt', 'my-public-bucket') ``` When I run the code, I get this behavior: ``` botocore.exceptions.ClientError: An behavior occurred (AccessDenied) when calling the PutObject operation: Access Denied ``` I've confirmed that the IAM role I'm using has the necessary permissions (`s3:PutObject`) for this bucket, but the public policy seems inadequate for the upload. I've also tried using the accelerated endpoint directly and still get the same behavior. Could someone guide me on what changes I need to make to allow public uploads using Transfer Acceleration? Has anyone dealt with something similar?