Falling in Love With My Life

And wound me it did. Like a surgeon cutting out the infection of an injury that refuses to heal, she pinpointed the unhealthy competition I used as a smokescreen to cover my heart. The key to why I…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




EC2 And IAM Roles

1.Create a DynamoDB table for something of your choosing (e.g. movies, food, games)
2. Add 10 or more items to the table
3. Create a t.2micro Ec2 instance
4. Using an IAM role and the principle of least privilege, grant the EC2 instance read access to DynamoDB.
5. Use the AWS CLI in the EC2 instance to scan the DynamoDB table
6. Use the AWS CLI in the EC2 instance to validate you cannot write an item to the DynamoDB table

Our first objective is to create a DynamoDB table for a topic of my choosing. I chose to go with Marvel movies. In the console, find DynamoDB and click create table.

Next we name the table and add partition and sort key names.

Now we edit the table so we can add items to the table. Click create item and name the items. We need 10 items for this project.

Our next objective is to create an EC2 instance that has the correct setup to be accessible via internet and ssh which we did in a previous medium article where we created VPCs, subnets, internet gateways, security groups, key pairs, etc so it will function as intended.

Can’t forget to add Apache to the user data section.

Now we setup an IAM role that grants read only access to the Dynamo table from the instance.

Here we added the read only access to DynamoDB. Then name and create the role.

We should be able to ssh into the instance we created now and complete our last 2 steps.

Next we scan the table from CLI and it should populate all the items we put into the table earlier.

All 10 items are there. Now let’s see if we can do more than just read what’s in this table.

We cannot add any items to this table and we get this error message. Which is what we wanted to make sure we can’t do anything except read due to the IAM role we created. Failed successfully.

Add a comment

Related posts:

VOLLEY

Volley is a one-stop shop for decentralized finance, cross-chain exchange, staking, earning and earning farming on the Ethereum Blockchain. Volley created a DeFi ecosystem to make DeFi items more…

Best Pharmacy College in Lucknow

Seiko College of Pharmacy is Known for the best pharmacy college in Lucknow. It offers top-notch education and creates benchmarks in academic excellence and holistic grooming to help students meet…

Person of interest in real life with deep learning

If you are on a high hill and there are no buildings higher than where you are, you can see a large part of Istanbul at a glance; But if your goal is not only to watch Istanbul, but to take notes of…