Create a "cloudsploit" user, with the SecurityAudit
policy.
- Log into your AWS account as an admin or with permission to create IAM resources.
- Navigate to the IAM console.
- Click on Users
- Create a new user (Add user)
- Set the username to
cloudsploit
- Set the access type to "Programmatic access", click Next.
- Select "Attach existing policies directly" and select the SecurityAudit policy.
- Click "Create policy" to create a supplemental policy (some permissions are not included in SecurityAudit).
- Click the "JSON" tab and paste the following permission set.
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "ses:DescribeActiveReceiptRuleSet", "athena:GetWorkGroup", "logs:DescribeLogGroups", "logs:DescribeMetricFilters", "elastictranscoder:ListPipelines", "elasticfilesystem:DescribeFileSystems", "servicequotas:ListServiceQuotas" ], "Resource": "*" } ] }
- Click "Review policy."
- Provide a name (
CloudSploitSupplemental
) and click "Create policy." - Return to the "Create user" page and attach the newly-created policy. Click "Next: tags."
- Set tags as needed and then click on "Create user".
- Make sure you safely store the Access key ID and Secret access key.
- Paste them into the corresponding AWS credentials section of the
index.js
file.
If using environment variables, the same ones expected by the aws sdks, namely AWS_ACCESS_KEY_ID
, AWS_SECRET_ACCESS_KEY
, and AWS_SESSION_TOKEN
, can be used.