AWS Assume IAM Role - Step by Step tutorial (Part-3)

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 มิ.ย. 2024
  • 🎥 In this tutorial, we dive deep into AWS Identity and Access Management (IAM) to understand how to assume roles and grant temporary permissions to users.
    🔵 What You'll Learn:
    1. Create a Generic IAM Role: Start off by understanding the basics of IAM roles and how to create a generic role.
    2. Create IAM User & Assume Role: Dive deeper as we create an IAM user and grant this user permissions to assume a role.
    3. Create IAM Policy & Attach to the User: Conclude by crafting a specific IAM policy and attaching it to the user, defining the precise permissions they have when assuming the role.
    🔵 Why is this Important?
    Assuming roles in AWS is crucial for temporary access, cross-account access, and ensuring that your AWS infrastructure maintains a high standard of security. Mastering this concept is a must for those who aim to manage and administer AWS resources effectively.
    🔗 Resources & Additional Reading:
    AWS Official Documentation on IAM Roles: docs.aws.amazon.com/IAM/lates...
    AWS Security Best Practices: docs.aws.amazon.com/whitepape...
    IAM Policy Generator: awspolicygen.s3.amazonaws.com...
    Timestamps:
    0:00 - Introduction
    1:30 - Create a Generic IAM Role
    3:49 - Create IAM User & Assume Role
    4:13 - Enable AWS console for IAM User
    6:26 - Create IAM Role
    7:43 - Create IAM Policy & Attach to the User
    12:09 - Testing & Demonstration
    16:12 - Conclusion & Key Takeaways
    👍 If you found this tutorial helpful, please like, share, and subscribe for more in-depth AWS tutorials. Drop any questions or feedback in the comments below. Happy learning!
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 74

  • @ChadDiaz-qk4fb
    @ChadDiaz-qk4fb 4 หลายเดือนก่อน +2

    This was a great tutorial. I now understand how to assume roles better. Thank you

    • @RahulWagh
      @RahulWagh  4 หลายเดือนก่อน

      You're very welcome!

  • @anild-fh4tb
    @anild-fh4tb 2 หลายเดือนก่อน +1

    Thank you Rahul! Great content! It really helped me a lot, I have gone through your Terraform videos also. I wish you good luck and keep educating us.

    • @RahulWagh
      @RahulWagh  2 หลายเดือนก่อน

      Glad it helped

  • @vlogswithtownboy
    @vlogswithtownboy 23 วันที่ผ่านมา

    perfect tutorial for assume role...thanks!!!

  • @mihirsuratwala9563
    @mihirsuratwala9563 4 หลายเดือนก่อน

    Thanks for such nice video, also when we create a Iam role. In that we can edit the trust relationship and add multiple user's arn in list. Which will be more easy to give the assume role permission to multiple users at once.

  • @user-zo3qj2pf5w
    @user-zo3qj2pf5w 3 หลายเดือนก่อน

    hi Rahul,these tutorials helped me a lot ,please make a dedicated video on control Tower as its trending right now and we also got a project to migrate the existing accounts to control tower,you video will help me a lot,thanks in advance

  • @RajashekarReddydasari
    @RajashekarReddydasari 4 หลายเดือนก่อน +11

    What is the difference? Normally you would attach policies in the iam user and now you are saying assumerole. How is this beneficial? People keep saying temporary credentials but no proper example. Take a usecase like onprem Jenkins deploying code to ec2 instance or webapi calling lambda.

    • @AdarshKumar-dk6sk
      @AdarshKumar-dk6sk หลายเดือนก่อน +1

      Role is for the service and policy is for the user

    • @rahulsingh-iq4gd
      @rahulsingh-iq4gd หลายเดือนก่อน +1

      ⁠@@AdarshKumar-dk6skyo bro that was just generic answer, the real answer to @rajashekar question is
      In this assume role with inline policy defined and applied by Rahul is to temporarily give permission to specific user after that particular user
      Logs out of his account he will no longs have that assume role service access, it is useful when we setup zero trust policy in our company.

  • @denzilpeiris492
    @denzilpeiris492 4 หลายเดือนก่อน

    Excellent explanation, though I am a bit confused, rather might I say, trying to understand what would be the best case, real time scenario where STS: Assume Role can be implemented?

  • @nehakamath8321
    @nehakamath8321 4 หลายเดือนก่อน

    Thank you for the tutorial ! :)

    • @RahulWagh
      @RahulWagh  4 หลายเดือนก่อน

      You're welcome 😊

  • @kiransonawane2940
    @kiransonawane2940 7 หลายเดือนก่อน

    Really Awesome... :)

  • @Learn_IT_with_Azizul
    @Learn_IT_with_Azizul 5 หลายเดือนก่อน

    Awesome.... was searching this content. Thank You

    • @RahulWagh
      @RahulWagh  5 หลายเดือนก่อน

      Glad it was helpful!

  • @thapasujan07
    @thapasujan07 10 วันที่ผ่านมา

    Thank you Sir. Please keep uploading these. ❣

    • @RahulWagh
      @RahulWagh  6 วันที่ผ่านมา

      Cheers

  • @ManojKumar-fb9zc
    @ManojKumar-fb9zc 5 หลายเดือนก่อน +1

    its a tricky concept , but you explained it very easily . Appreciate your great work and good luck

    • @RahulWagh
      @RahulWagh  5 หลายเดือนก่อน

      Glad to know I hope you enjoyed

    • @ManojKumar-fb9zc
      @ManojKumar-fb9zc 5 หลายเดือนก่อน

      @@RahulWagh i further tried to imply the same concept to a user group , it worked like a charm , thanks again

    • @RahulWagh
      @RahulWagh  5 หลายเดือนก่อน

      @ManojKumar-fb9zc glad to know it worked for you😊. It is always focus on concept rather then easy fix

  • @shadyapp7416
    @shadyapp7416 6 วันที่ผ่านมา

    I am aws solution architect professional certified, still refreshing my knowledge seeing ur videos😂

    • @RahulWagh
      @RahulWagh  6 วันที่ผ่านมา

      Glad to hear that

  • @pupu86
    @pupu86 2 หลายเดือนก่อน

    Very well explained. Thank you

    • @RahulWagh
      @RahulWagh  2 หลายเดือนก่อน

      You are welcome

  • @dgillies5420
    @dgillies5420 3 หลายเดือนก่อน

    Role is a container for a set of policies, and can be thought of as a phantom user. When you assumeRole, you become that phantom user to gain access to several different policies at once.

  • @testK21
    @testK21 หลายเดือนก่อน

    You are the best.

    • @RahulWagh
      @RahulWagh  หลายเดือนก่อน

      Thanks for stopping by on my channel keep following for more similar content

  • @gerlynm50
    @gerlynm50 6 หลายเดือนก่อน +1

    underrated content!

    • @RahulWagh
      @RahulWagh  6 หลายเดือนก่อน

      I am glad that you found it useful

  • @hashilbh5654
    @hashilbh5654 7 หลายเดือนก่อน

    This is awesome 🎉

    • @RahulWagh
      @RahulWagh  7 หลายเดือนก่อน

      Glad it helped

  • @user-sy6lq1it6f
    @user-sy6lq1it6f 3 หลายเดือนก่อน

    Hi Rahul,
    Nice tutorial, How we can transfer data between Amazon S3 buckets using AWS Transfer Family

  • @purnimashanti26
    @purnimashanti26 6 หลายเดือนก่อน

    Thank you.

    • @RahulWagh
      @RahulWagh  6 หลายเดือนก่อน

      You're welcome!

  • @priyankapani9750
    @priyankapani9750 3 หลายเดือนก่อน

    Really nice content.
    Sir you have a soothing voice.

    • @RahulWagh
      @RahulWagh  3 หลายเดือนก่อน

      So nice of you

  • @user-zo7up3bz4r
    @user-zo7up3bz4r 3 หลายเดือนก่อน

    Hey Rahul,
    For a small organization setup, no need to have 2 separate policies (resource policy & Trust Policy)
    We can give resource ARN (of who needs to assume this role) in the role trust relationship tab itself like below.
    Please share your comments..
    In your video though & by default, Principal is AWS account.
    {
    "Version": "2012-10-17",
    "Statement": [
    {
    "Effect": "Allow",
    "Principal": {
    "AWS": "arn:aws:iam::XXX:user/test-user"
    },
    "Action": "sts:AssumeRole",
    "Condition": {}
    }
    ]
    }

  • @user-kz7hq7lt9s
    @user-kz7hq7lt9s 3 หลายเดือนก่อน

    Why to use that sign in link of the IAM role again after we created a inline-policy for the IAM user(test-user) where we have given the action to assume the IAM role(S3-Full-access-role). what's the significance of inline-policy then?

  • @shivaprasadvadde6503
    @shivaprasadvadde6503 6 หลายเดือนก่อน +1

    Great explanation sir....make some videos on small projects sir... that was helpful for us...THANK YOU

    • @RahulWagh
      @RahulWagh  6 หลายเดือนก่อน

      Soon you will see

  • @user-jf1mz2ds6b
    @user-jf1mz2ds6b 3 หลายเดือนก่อน

    very informative

    • @RahulWagh
      @RahulWagh  3 หลายเดือนก่อน

      You are welcome

  • @srgrmohan
    @srgrmohan หลายเดือนก่อน

    Thanks

    • @RahulWagh
      @RahulWagh  หลายเดือนก่อน

      Welcome

  • @SuperSrikanth2012
    @SuperSrikanth2012 4 หลายเดือนก่อน

    can we attache policy directly to IMA User without role

  • @ventin75
    @ventin75 5 หลายเดือนก่อน

    It will be great if you can add in how to perform these in the CLI.

    • @RahulWagh
      @RahulWagh  5 หลายเดือนก่อน

      But why do not you use the Terraform so that you have infrastructure as a code

    • @ventin75
      @ventin75 5 หลายเดือนก่อน

      @@RahulWagh All the infra is already provisioned except the instance. So I just need a simple CLI command to run the instance.

  • @bantamalebronejames9588
    @bantamalebronejames9588 2 หลายเดือนก่อน +1

    Rahul, please what is the difference between this and the Part 1 video. For me it looks the same, but this one is a long process

    • @RahulWagh
      @RahulWagh  2 หลายเดือนก่อน +1

      Part 1 is only focused on creating IAm role and user.
      But this part is more focused on how to assume the IAM role.
      Both the parts will look same in the beginning but there is big difference when you reach towards the end.

    • @bantamalebronejames9588
      @bantamalebronejames9588 2 หลายเดือนก่อน

      Alright, thank you@@RahulWagh

  • @user-gr1ux3qm9w
    @user-gr1ux3qm9w 3 หลายเดือนก่อน

    Sir, What is the difference between root user and management account?

  • @pedrocarbon
    @pedrocarbon 6 หลายเดือนก่อน

    I was invited to entry a organization company in AWS, create my account, accept the invitation. But when i log in i dont see any service of the organization, just of my own account. How can i switch to see the services of the company?

    • @shivaprasadvadde6503
      @shivaprasadvadde6503 6 หลายเดือนก่อน

      I think still you don't have any permissions to access

  • @isaacambi1914
    @isaacambi1914 7 หลายเดือนก่อน

    I hope you have something on cloudformation

    • @RahulWagh
      @RahulWagh  7 หลายเดือนก่อน +1

      It is in my pipeline you would see those coming soon in upcoming weeks

  • @ritupradhan6922
    @ritupradhan6922 2 หลายเดือนก่อน

    Why we need aws role if we already have IAM policies.... root account can attache s3 policy for test user or if the test user is the root user than it have already all access....

    • @RahulWagh
      @RahulWagh  2 หลายเดือนก่อน

      Yes you are right but here I am trying to explain the assume by simulating the root user, test user and IAM roles otherwise how would explain the assume role scenario.
      I could easily solve the whole scenario by assigning correct IAM role to test user but that is not the case

  • @user-mb1xr3zu3b
    @user-mb1xr3zu3b หลายเดือนก่อน

    Sir a doubt, that means roles can be assumed for a single time or upto a time limit but policies will be permanent? Is my understanding right ?

    • @RahulWagh
      @RahulWagh  หลายเดือนก่อน

      Roles can be assumed when ever we need there is no time limit

    • @user-mb1xr3zu3b
      @user-mb1xr3zu3b หลายเดือนก่อน

      @@RahulWagh sir then if we are creating policies and using them directly to our users and services why there is a need of roles ? Please differentiate and help me understand

  • @anilrout9388
    @anilrout9388 26 วันที่ผ่านมา

    nice once can you create s3 cross region with 2 account

    • @RahulWagh
      @RahulWagh  25 วันที่ผ่านมา

      I will try

  • @mangeshkhandale6435
    @mangeshkhandale6435 3 หลายเดือนก่อน

    Content is good but the example given here is slightly confusing.
    In this example, you have created a user which inline policy calls the role. It is policy attached to the Role where the actual instructions are given to grant the access to the S3.
    Although this has worked but it is complex use.
    On the other hand the same can be achieved without uaing Role also. Here is how:
    Go to user & inline policy in it. In this policy you mark "Effect: Allow" , "Action:s3.*", "Resource:*"
    Thats it.
    Your user can now able to access the S3. No need to assume any Role or switch the URL etc.

    • @mangeshkhandale6435
      @mangeshkhandale6435 3 หลายเดือนก่อน

      Above is the example of inline policy. You can also attach the AWS managed policy.
      E.g. in the same example above, when click on add permissions select "Add permissions" instead of "Create inline policy"
      Select radio button "Attach policy directly". A list of policies appears. Select "AmazonS3FullAccess" from the list and save it.
      That's it. Your test user can now access the S3 services

    • @RahulWagh
      @RahulWagh  3 หลายเดือนก่อน

      @mangeshkhandale6435 I think you are confused i am not solving the problem on accessing the s3 bucket but instead how to access s3 bucket owned by the other account via assume role.
      Otherwise why would aws have the concept of assume role

    • @mangeshkhandale6435
      @mangeshkhandale6435 3 หลายเดือนก่อน

      Yes. I got it.
      What I was trying to say is , technically both approaches work.
      I'm not able to understand what is the benifit of assuming roles by IAM user. In the example you given I don't see any benifit.
      But definitely there must be some use cases. I'm not a pro in AWS.
      But I can see from vedios you have good knowledge here. May be you can create a vedio on use case where IAM user assume role instead of permissions from inline policies.

  • @sithembisongiba5048
    @sithembisongiba5048 6 หลายเดือนก่อน

    😢help here, root user can't create user because no identity based policy

  • @Lakshmanan-og2ws
    @Lakshmanan-og2ws 5 หลายเดือนก่อน

    could you please put Video to deploy databricks14 day free trail in AWS , it will be more useful to me and also Subscribers , Thank you.

    • @RahulWagh
      @RahulWagh  5 หลายเดือนก่อน

      We will try

  • @bikdigdaddy
    @bikdigdaddy 13 วันที่ผ่านมา

    amazing. thank you so much :)

    • @RahulWagh
      @RahulWagh  10 วันที่ผ่านมา

      You are welcome