How To: Cross Account S3 Bucket Access (3 Min) | AWS | Using IAM Policies

preview_player
Показать описание
In this video, you'll learn how to provide cross account S3 bucket access in AWS using IAM policies.



Video Transcript:

Hi guys, this is Abhi from Gokcedb. In this video, you're going to learn how to provide cross-account S3 bucket access in AWS. Let's start by navigating to the S3 service.

Here, I own a bucket called my test 45 which I want to provide another account access to. I'm logged into the other account as John in the Firefox browser. Next, navigate to the IAM service the clickon policies.

Hit create policy then go to the JSON tab. Grab the JSON code from this AWS blog and paste it into the code window. This policy allows you to list all the buckets in the accounts and also allows you to get input objects in a specific bucket.

I'm going to replace the account bucket name with my test bucket 45 then hit next. Give this policy a name then hit the create policy button. Next, click on roles then hit create a role. Select the custom trust policy then copy and paste the trust policy code from the same blog.

Replace account B with the account ID of the other account and account B's username with the actual username. Hit next then select the policy that we just create then hit next again. Give your role a name then click on create the role.

Now, let's switch back to John's account window and navigate to the IAM service, click on users then click on John. Click on Add online policy then navigate to the JSON tab. Copy and paste the SDS assume role policy from the same blog.

Replace account a with the account ID of the main account and replace account a role with the IAM role that we created earlier. Hit review policy, give it a name then click create. Next, click on the account ID on the drop-down then click on switch role.

Enter the account ID and the role from the main account then click on switch role again. Navigate to the S3 service and now you should be able to go inside my test bucket 45. You should be able to download any objects inside this bucket.

There you have it. Make sure you like, subscribe, and turn on the notification bell.  Until next time.
Рекомендации по теме
Комментарии
Автор

Thanks for your generosity Gokce DB...This tutorial is so cool and very interesting to all of your viewers.😊

bert
Автор

This tutorial is not working anymore: Missing required field Principal

lambertarthur