- Newest
- Most votes
- Most comments
To access an S3 bucket that has been shared with your account by Amazon Ads, you need to understand that this is a cross-account access scenario where the bucket exists in Amazon's account, not yours.
The error "Bucket already exists" when trying to create a bucket with the same name doesn't necessarily mean the bucket is in your account - it simply means that bucket name is already taken in the global S3 namespace.
Since the bucket is shared programmatically (not visible in the console), here's how you can access it:
-
First, ensure you have the correct IAM permissions in your account to access the shared bucket. You'll need an IAM policy that allows actions like s3:GetObject, s3:ListBucket on the specific bucket.
-
When using AWS CLI or SDK, you need to specify the bucket name directly rather than trying to list all buckets:
- For example:
aws s3 ls s3://specific-bucket-name/ - Or to download a specific report:
aws s3 cp s3://specific-bucket-name/path/to/report local-destination
- If you're using an SDK, you'll need to create an S3 client with your credentials and then directly reference the bucket name in your operations.
The key point is that the bucket won't appear in your account's bucket list since it's owned by Amazon's account, but you can still access it directly by name if you have the proper permissions. Make sure you're using the exact bucket name provided by Amazon Ads in their documentation or communications.
If you're still having issues, you may need to contact Amazon Ads support specifically (not AWS support) as they would be the ones who configured the cross-account access.
Sources
Account A to access an S3 bucket in Account B | AWS re:Post
Cross account bucket access - Research and Engineering Studio
answered a year ago
Relevant content
- AWS OFFICIALUpdated 4 years ago
- AWS OFFICIALUpdated 3 years ago
