Skip to content

discoverrange/aws_automation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

aws_automation

Lamda function In this we are using boto3 libary, The lamda function will delete the inactive access keys for than 30 days.

Attach the following role to the lamda with the below inline policy

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": [
                "iam:ListUsers",
                "iam:ListAccessKeys",
                "iam:GetAccessKeyLastUsed",
                "iam:DeleteLoginProfile",
                "iam:GetAccessKeyLastUsed",
                "iam:ListAccessKeys",
                "iam:ListUsers",
                "iam:GetUser",
                "iam:GetLoginProfile",
                "iam:UpdateAccessKey",
                "logs:CreateLogStream",
                "logs:CreateLogGroup",
                "iam:ListAccountAliases",
                "logs:PutLogEvents",
                "iam:DeleteAccessKey"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
    ]
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published