- Lab
- A Cloud Guru
Implementing Fine-Grained Access Control for DynamoDB
In this lab, we will create fine-grained access control IAM policies and attach them to provided IAM roles, and then test that the roles we have created are working as expected.
Path Info
Table of Contents
-
Challenge
Create and Attach Policy for FGACUser IAM Role
- Navigate to the IAM web console.
- Select Policies.
- Click Create policy.
- Create a policy that only allows access to the attributes specified in the lab information.
- Attach the create policy to the FGACUser IAM role.
-
Challenge
Create and Attach Policy for FGACAdmin IAM Role
- Navigate to IAM web console.
- Select Policies.
- Click Create policy.
- Create a policy that provides general read access to the
pinehead_records_s2
DynamoDB table. - Attach the created policy to the FGACAdmin IAM role.
-
Challenge
Test Your Policies from the Provided EC2 Instance
-
Log in to the provided EC2 instance.
-
Run the following commands — the first should result in an
AccessDeniedException
. The last two should return 10 items each.aws dynamodb scan --table-name pinehead_records_s2 --profile fgacuser
aws dynamodb scan --table-name pinehead_records_s2 --profile fgacuser --projection-expression "artist_name,id,album_art,title"
aws dynamodb scan --table-name pinehead_records_s2 --profile fgacadmin
-
What's a lab?
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.