Tech Junkie Blog - Real World Tutorials, Happy Coding!: Iaas With AWS: Introduction to AWS S3 And IAM Role

Wednesday, September 8, 2021

Iaas With AWS: Introduction to AWS S3 And IAM Role

 In the world of AWS you have to be familiar with the different features and what they are called.  Well two very important building blocks of all the services that AWS offers are the S3 and the IAM Role.  S3 is basically an object storage repository that are called buckets, but it is more than just a storage, you can turn to the storage into a static website. We'll get into that later. It's public facing, so you can access it over the internet. 

IAM Role is an identity that you can assign policies to and that role assumes the permission.  Therefore only instances with a role that has a policy to access S3 can assume that role and have access to the S3.


So let's start creating the assets on the diagram above:

First let's create the S3 bucket.  The thing to remember is that the bucket name has to be unique, because it's a global object.

1. Go to the S3 dashboard and click on "Create bucket"

2.  We are just going to create an simple S3 bucket, so just type in a unique name give it a region and click "Create"


A bucket is created, it's as simple as that 

Now we want to create an IAM Role so that we can access S3 with one of our instances.  Go to the IAM dashboard and click on "Roles"




Click on "Create role" button


It's so commonly created that there's an EC2 link at the top of the page, click on it.


Click on "Next: Permissions" button


In the search box type S3 then select "AmazonS3FullAccess", then click "Next: Tags"


Click "Next" on the tags page, when you are at the final stage, type in the role name to create the new role


As you can see there's a S3 full access policy attached to the role, now we just need to assign the role to an instance.


To attach the role to the EC2 instance, go the EC2 instances page, select the instance and right click. Then click on "Instance Settings", then select "Attach/Replace IAM Role"


Select the role you just created on the "IAM Role" dropdown, then click "Apply"

Now SSH into the instance and type in the following command to test if you have access to S3. We are just going to list the S3 buckets.  Just type aws s3 ls and you will see the bucket that we've just created

7 comments:



  1. Your blog is very informative, finally, I found exactly what I want. Paypal is an excellent service for online payments but lots of its users confront issues while they access Paypal. If you want to resolve your problems then must visit Paypal contact.

    ReplyDelete
  2. Your blog is very informative, finally, I found exactly what I want. Paypal is an excellent service for online payments but lots of its users confront issues while they access Paypal. If you want to resolve your problems then must visit contact Paypal Nederland.

    ReplyDelete
  3. Your blog is very informative and interesting to read, finally, I found exactly what I search for. There are lots of users of Macfee antivirus in the world because of its features and easy interface. If you want to explore more interesting facts about Mcafee antivirus or want to resolve your technical issues then must visit Mcafee ondersteuning nummer.

    ReplyDelete
  4. Your blog is very informative and interesting to read, finally 2nd day after Fut hair transplantation

    ReplyDelete
  5. For help from our expert team, follow the Get help link below to chat or request a call—we'll call you so you don't have to wait. For even faster help, search for your Outlook Support Help Number... If you are a business user. Important Links. Contact Support. Global Customer Service Phone No.'s users want to fix all eMails issues, call us: +1-(806) 552 0044…

    ReplyDelete
  6. My name is Upan, I have more than 3 years of experience in Shopify dropshipping store development and products listing. I help my clients to boost their sales by importing the best product reviews for their products.

    Will you import reviews from aliexpress to shopify?
    Order Link: https://www.fiverr.com/share/XmW1Em

    ReplyDelete

Search This Blog