AWS Identity and Access Management Service
cloud AWS

5 minutes


go back go back go back home home

Identity And Access Management

"IAM Group"

Here is a good sample policy:

{
    "Id" : "S3-Account-permission",         //Id is optional
    "Version" : "2023-05-17",               //Policy Language Version
    "Statement": [                          // A statement field is mandatory and consists of one or more individual statements
        {
            "Effect" : "Allow",
            "Action" : "ec2:Describe",
            "Resource": "*"
        },
        {
            "sid"       : "1",              //Sid is Statement ID and is optional
            "Effect"    : "Allow",          //Effect can be: Allow/Deny
            "Action"    : "elasticloadbalancing:Describe",
            "Resource"  : "*"
        },
        {
            "Effect" : "Allow",
            "Action" : [                    //Action can also be an array
                "cloudwatch:ListMetrics",
                "cloudwatch:GetMetricsStatistics",
                "cloudwatch:Describe*"
            ]
            "Resource": "*"
        },
        {
            "sid" : "2",
            "Effect" : "Allow",
            "Principal" : {
                "AWS" : ["arn:aws:iam::123456789012:root"]
            },
            "Action" : [
                "s3:getObject",
                "s3:putObject"
            ],
            "Resource": ["arn:aws:s3::mybucket/*"]
        }
    ]
}

Please do not be intimidated by the above monstrosity, you will get used to it once you understad what everything does. Here is an explaination of all the items in the Policy:

ItemExplaination
sidIdentifier for Statement
EffectWheather the statement allows/denies access (Allow/Deny)
PrincipalAccount/User/Role to which policy is being applied to
ActionList of action, this policy allows or denies
ResourceList of Resource to which action is applied to
ConditionCondition for when the policy is in effect

IAM - Multifactor Authentication (MFA)

User has access to your account & can possibly configure or delete resources in your AWS account. You want to protect your root account & IAM users. MFA = Password you know + Security Device you own.

MFA supports the following MFAs:


How can a user access AWS

To Access AWS, you have 3 options:

ACCESS_KEYS are generated using AWS Console and User manage their own access keys.

Word of Warning : DO NOT SHARE ACCESS KEYS PLZ.!!

Roles in IAM

"EC2 with Policy"