Problem Statement:
You work for XYZ Corporation. To maintain the security of the AWS account and
the resources you have been asked to implement a solution that can help easily
recognize and monitor the different users.
Tasks To Be Performed:
1. Create a role which only lets user1 and user2 from task 1 to have complete
access to VPCs and DynamoDB.
2. Login into user1 and shift to the role to test out the feature.
Solution: -
a) Login to AWS Console.
b) Go to IAM – Policies
c) Click on Create Policy.
d) Choose JSON
e) Then we allow to ec2 & dynamodb.
f) Then click Next
g) Then we give policy name [VPC-DynamDB-FullAccess].
h) Now we create IAM Role.
i) Go to IAM – Roles
j) Click on Create Role.
k) Select AWS Account
l) Choose This Account
m) Then click on Next.
n) Then attach the policy to role.
o) Then click on Next.
p) Then we give the role name Role-1
q) Now we will allow user 1 and user2 to assume this role.
r) Open the Role-1
s) Go to Trust Relationship.
t) Click Edit Trust Policy.
u) Click Update Policy.
v) Now only User1 and User2 can switch this role.
w) Now we login with our user1 – Dev1
i) Go to AWS Console.
ii) Login using Dev1 credential.
x) Then we check the DynamoDB & VPC have full access.
As we can see Dev1 has full access of DynamoDB.
As we can see Dev1 has full access of VPC.
And here we can see the last activity, password age & console last sign-in details of user1 –
Dev1.