AWS - 22 - Access S3 Objects of One Account from EC2 Instance in Another Account

Поделиться
HTML-код
  • Опубликовано: 28 ноя 2024
  • This video will explain how to access S3 buckets and objects in one AWS account from an EC2 instance in another account. Create an EC2 role with sts assume role and attach the same to the EC2 instance. The sts assume role should be created with s3 access in the other account. Create a temporary sts token to get access to the S3 buckets and objects in another account.
    Your feedback and suggestions are always appreciated.
    If you really like this video kindly subscribe and press the bell icon to be the one to get any updates from this channel.
    Playlist link - www.youtube.co...
    LinkedIn - / suroj-bera-32101a127
    Disclaimer/Policy:
    --------------------------------
    Note: All uploaded contents in this channel are mine and it's not copied from any community.

Комментарии • 25

  • @karthikaravikumar6083
    @karthikaravikumar6083 Год назад

    Thank you so much for the wonderful video. Nice explanation. Its much much much helpful to do my task

    • @surojbera
      @surojbera  Год назад

      Glad it was helpful! Keep learning ✌️

  • @Kunal-best
    @Kunal-best Год назад

    Your way of teaching and the real time scenario explanation of all the concepts will make you one day an awesome Tech mentor and stand out among the crowded so-called mentors on RUclips.
    So don't stop bro.
    Continue your channel with providing more and more real time scenario classes regularly.
    Best of luck bro.

    • @surojbera
      @surojbera  Год назад

      Thank you Kunal. 😊 I really appreciate your valuable feedback. Keep learning and keep supporting. 🤞

  • @sachidanandshahane5709
    @sachidanandshahane5709 Год назад

    Good Explained, keep it up, and create more troubleshooting videos.

    • @surojbera
      @surojbera  Год назад

      Appreciate your valuable feedback. Keep learning. 🤞

  • @kalyansarkarsit
    @kalyansarkarsit Год назад

    👌 awesome lecture...

    • @surojbera
      @surojbera  Год назад

      Appreciate your valuable feedback. Keep learning.🤞

  • @MEHARAFROZ-ub1hr
    @MEHARAFROZ-ub1hr 8 месяцев назад +1

    Awesome video.. Thankyou

    • @surojbera
      @surojbera  8 месяцев назад

      My pleasure 😊

  • @dideepakindorkar3413
    @dideepakindorkar3413 2 месяца назад

    Thanks

  • @vicky-xv1xs
    @vicky-xv1xs 4 месяца назад +1

    Don't we need to allow any permission in S3 bucket policy ?

    • @surojbera
      @surojbera  4 месяца назад

      No. Not required in this case.

  • @JohnsonThomas-g5u
    @JohnsonThomas-g5u 6 месяцев назад

    can we use this method in daily backup process to s3 from ec2?

  • @arpitamondal5602
    @arpitamondal5602 Год назад

    😮

  • @mohankumarsharma-c2v
    @mohankumarsharma-c2v Год назад

    Since service token is valid for limited period ,how we can make it permanent to access bucket of diff account through IAM Role?
    also please help me in how we can access it by IAM user also.

    • @surojbera
      @surojbera  Год назад

      Thanks, Mohan for bringing new questions. I shall create videos on those scenarios.

  • @abhishekdubey-p9n
    @abhishekdubey-p9n Год назад +1

    I have to do same connection i want to Access my S3 bucket in Putty but without IAM role and Aws Configure the same thing you r doing pls help me out is there any documentation or any BLOG ??

    • @surojbera
      @surojbera  Год назад

      I am not sure at this moment. But I believe we can achieve this with S3 bucket policy. Let me check and get back to you.

    • @surojbera
      @surojbera  Год назад

      Just to clarify one point. If you are using putty to login to an EC2 instance and want to access the S3 bucket in a different account, the EC2 instance should have a role attached to it or we need to configure credentials using the aws configure command.

    • @abhishekdubey-p9n
      @abhishekdubey-p9n Год назад

      @@surojbera see we use this command to list S3(aws s3 ls) but it shows to do aws configure if i attach iam role to my instance it doesn't ask for this my use case is to do not attach IAM role and do no configure AWS but want to list my S3 bucket. So u r telling i can achieve this with bucket policy pls help me out ..

    • @surojbera
      @surojbera  Год назад

      @@abhishekdubey-p9n You just create one EC2 instance and one s3 bucket in the same AWS account. In the bucket policy of the S3 bucket write the below policy.
      {
      "Version": "2012-10-17",
      "Statement": [
      {

      "Effect": "Allow",
      "Principal": "*",
      "Action": "s3:*",
      "Resource": [
      "arn:aws:s3:::",
      "arn:aws:s3:::/*"
      ],
      "Condition": {
      "IpAddress": {
      "aws:SourceIp": ""
      }
      }
      }
      ]
      }
      Now login to your ec2 instance and write the below command to list all the objects inside your bucket.
      aws s3 ls --no-sign-request
      It will list all the objects inside your bucket.
      Using the above policy you can do different operations with the S3 bucket objects. I am not sure at this moment how to list all the buckets in the AWS account without credentials. I shall create a video with cross-account access without credential setup.

    • @abhishekdubey-p9n
      @abhishekdubey-p9n Год назад

      @@surojbera Better u make the video on this it will very helpfull if any other get same use case pls