AWS Classroom Series – 30/Sept/2021

AWS IAM WorkItems

  • Create an IAM user with programmatic access and administrator Access and configure the user in the AWS CLI

  • Now lets try to create 2 users using AWS CLI Refer Here

aws iam create-user --user-name ironman
aws iam create-user --user-name thor
  • Now lets create a group called as DBAdmins
aws iam create-group --group-name dbadmins
  • Now lets attach a Policy AmazonRDSFullAccess to the group
aws iam attach-group-policy --group-name dbadmins --policy-arn 'arn:aws:iam::aws:policy/AmazonRDSFullAccess'
  • Now lets add users to the group
aws iam add-user-to-group --group-name dbadmins --user-name ironman
aws iam add-user-to-group --group-name dbadmins --user-name thor
  • Now lets try to create access key for the user
aws iam create-access-key --user-name ironman > ironman.json
aws iam create-access-key --user-name thor > thor.json
  • Rotating IAM Credentials
  • Now delete the old access key
  • Exercise:
    • Write a shell script to rotate credentials for all iam user except "admin"
    • Note: to get the list of user aws iam list-users --query "Users[*].UserName"

Leave a ReplyCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Customized Social Media Icons from Acurax Digital Marketing Agency

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Exit mobile version
%%footer%%