AWS - 13 - Access S3 Objects from EC2 Instance

Поділитися
Вставка
  • Опубліковано 5 лис 2024

КОМЕНТАРІ • 27

  • @paulluciano
    @paulluciano 7 місяців тому

    Thank you Suroj, your video was very thorough and easy to follow. I was able to recreate the steps in my own environment.

    • @surojbera
      @surojbera  7 місяців тому

      Glad it helped. 😊

  • @CyberGenious24
    @CyberGenious24 Рік тому

    Great simple and clear
    Thank you very much for your efforts for video

    • @surojbera
      @surojbera  Рік тому

      Thank you Aditya for your valuable feedback. Keep learning. 🤞

  • @viniciussoares4620
    @viniciussoares4620 Рік тому

    Thank you very much for this vídeo! This helped me so much!!

    • @surojbera
      @surojbera  Рік тому

      You are always welcome. 😊 Keep learning.

  • @aruk1040
    @aruk1040 2 місяці тому

    thank you so much!

  • @JoseCastro-ql1yl
    @JoseCastro-ql1yl Рік тому

    very good

    • @surojbera
      @surojbera  Рік тому +1

      Appreciate your valuable feedback. Keep learning. 😊

    • @prasadpatil50
      @prasadpatil50 Рік тому

      @@surojbera keep teaching

  • @prasadpatil50
    @prasadpatil50 Рік тому

    noice

    • @surojbera
      @surojbera  Рік тому

      Thank you. Appreciate your valuable feedback 😊

  • @BiswajeetSethi-wi9mb
    @BiswajeetSethi-wi9mb Рік тому

    Command to print the file content ?please

    • @surojbera
      @surojbera  Рік тому

      Hi Biswajeet. The command is "cat filename". Ex - cat xyz.txt

  • @dipayonghosh8236
    @dipayonghosh8236 Рік тому

    How to access s3 object from ec2 in different region

    • @surojbera
      @surojbera  Рік тому

      Hi Dipayan. The S3 resource in different regions needs to be allowed to be accessed in the EC2 role. Then, you will be able to access the mentioned S3 resource.

    • @dipayonghosh8236
      @dipayonghosh8236 Рік тому

      @@surojbera can you pls explain. First of all, I am trying to restrict s3 access by ec2 only to same region ie if ec2 and s3 are in same region then only ec2 can access s3 otherwise not. How can i do that

    • @surojbera
      @surojbera  Рік тому

      @@dipayonghosh8236 S3 is a global service. Try creating one S3 bucket in a different region than where your EC2 is there. Provide the EC2 instance a role with S3 full access. Then from within the EC2 run the command "aws s3 ls" You will be able to see your S3 bucket created in different region.

    • @dipayonghosh8236
      @dipayonghosh8236 Рік тому +1

      @@surojbera that is ok!! Using s3 full access policy, every ec2 (same or diff region as s3) are able to access s3. But i want to restrict access so that only those ec2s which are in same region as s3 can only access and no other. How to do that?

    • @surojbera
      @surojbera  Рік тому

      @@dipayonghosh8236 You can restrict that in the IAM Policy. Create the below s3full access policy and attach the same to your EC2 instance role.
      {
      "Version": "2012-10-17",
      "Statement": [
      {

      "Effect": "Allow",
      "Action": "s3:*",
      "Resource": "*",
      "Condition": {
      "StringEquals": {
      "aws:RequestedRegion": "us-east-1"
      }
      }
      }
      ]
      }
      Here, "us-east-1" is the region where your S3 bucket is there. Let me know if that does not work.