Search code examples
amazon-web-servicesamazon-s3policy

Cross account S3 bucket access


I have a S3 bucket in AWS Account A. I want to access this S3bucket from another AWS Account B. I tried giving policy to S3bucket-A but it did't work out.


Solution

  • Amazon has published a detailed guide on how to do this here.

    For this to work, there are two things you have to do:

    1. You'll need to update the bucket policy of the bucket you want to share to grant access to your other account.
    2. On your other account, you'll need to create a policy that permits access to the bucket that's been shared - this can be done by attaching an inline policy to the user that grants permissions on the shared resource.

    If you're not sure how to configure everything, follow the instructions step by step in the link above.