Cross Account Access of S3


1. Login into the Root Account

 

URL: https://signin.aws.amazon.com/signin?redirect_uri=https%3A%2F%2Fap-northeast-1.console.aws.amazon.com%2Fconsole%2Fhome%3FhashArgs%3D%2523%26isauthcode%3Dtrue%26region%3Dap-northeast-1%26state%3DhashArgsFromTB_ap-northeast-1_bd682a7e73e1b5fc&client_id=arn%3Aaws%3Asignin%3A%3A%3Aconsole%2Fcanvas&forceMobileApp=0&code_challenge=lDm7WaCJ6pO8nxyAVOEZy424BsqTJSnoP8RoqTySBBU&code_challenge_method=SHA-256


Username: Email id

Password: ***********


2. Create a Bucket and upload an object.

EX: Bucket: ec2tos3bucket

      Object: Hello1.jpg 

           Hello2.doc


3. Create User IAM

Username: user1

Password: ******


4. Create Role

access Bucket from EC2 when role attached with EC2


5. Create Policy 


IAM >Policies>Create policy. 

  Select a Service: S3


Access level

List: ListJobs, ListAllMyBuckets


Read: GetObject

Write: PutObject


Resources


object: Add ARN 


Resource bucket name


Any bucket name.

arn:aws:s3:::ec2tos3bucket

Any object name.

*


Policy Name: S3CrossACPolicy


6. Attach Policy to the user

IAM >Users>user1>Add permissions>Attach policies directly>S3CrossACPolicy.


7. Access the bucket from user1.

Now you can access the bucket and object from user1.

                                **************Happy Learning************


Comments

Popular posts from this blog