AWS Classroomnotes 16/Mar/2023

AWS Managed Policies

  • Policies given aws by default are referred as Managed Policies
  • These are generic policies created and managed by aws
    Preview

AWS Customer Managed Policies

  • These are custom policies defined by AWS USers for custom permissions.
  • To Create Policies we need to understand
    • Service
    • Resource
    • Actions
  • Refer Here for the Actions, services and condition keys
  • Lets try to give an access to testers to start and stop ec2 instances
    • To start and stop ec2 user should be able to view ec2 instances
    • The actions which we have sorted are
      • StartInstances
      • StopInstances
      • DescribeInstances
    • Resources in this case is any ec2
    • Lets create a custom iam policy
      Preview
    • Choose service ec2 and then actions
      Preview
      Preview
      Preview
      Preview
      Preview
    • Now lets assign this to testers group
      Preview
    • Now lets login in and test the access
      Preview
      Preview
    • This user will be able to view, start and stop ec2 instances
    • The policy which we created from ui creates a json file
      json
      {
      "Version": "2012-10-17",
      "Statement": [
      {
      "Sid": "VisualEditor0",
      "Effect": "Allow",
      "Action": [
      "ec2:DescribeInstances",
      "ec2:StartInstances",
      "ec2:StopInstances"
      ],
      "Resource": "*"
      }
      ]
      }

Try Creating an iam policy for

  • any s3 bucket read, delete
  • any ec2 view and terminate ec2 instances
    Preview

Next Steps

  • Write policies in JSON
  • Use Simulator to test the policies
  • Exercise: Refer Here

Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a Reply

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

Please turn AdBlock off
Animated Social Media Icons by Acurax Responsive Web Designing Company

Discover more from Direct DevOps from Quality Thought

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

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube