turbot/aws_compliance

Control: 3.7 Ensure you are using an IAM policy to manage access to buckets in Lightsail

Description

The following policy grants a user access to manage a specific bucket in the Amazon Lightsail object storage service.

This policy grants access to buckets through the Lightsail console, the AWS Command Line Interface (AWS CLI), AWS API, and AWS SDKs.

Remediation

From the Console:

  1. Login to AWS Console using https://console.aws.amazon.com.
  2. Click All services, click IAM under Security, Identity, & Compliance.
  3. Click Policies.
  4. Click Create policy.
  5. Click on the JSON tab.
  6. Copy and paste the policy below into the JSON editor replacing the text in there and filling in the Lightsail bucket names.

You can find the Lightsail bucket name in the Lightsail console, Storage, Under buckets.

{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "LightsailAccess",
"Effect": "Allow",
"Action": "lightsail:*",
"Resource": "*"
},
{
"Sid": "S3BucketAccess",
"Effect": "Allow",
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::<BucketName>/*",
"arn:aws:s3:::<BucketName>"
]
}
]
}
  1. Click Next tags.
  2. Add tags based on your companies outlined Tagging policy that should be in place based on the AWS Foundations Benchmark.
  3. Click Next review.
  4. Click in Name* and give it a name that contains "Lightsail".
  5. Review the summary.
  6. Click Create policy.
  7. Click in the Filter policies by property or policy name and press enter.
  8. Type Lightsail and press enter.
  9. Click on the Policy name that you just created.
  10. Click on the Policy usage tab.
  11. Click Attach.
  12. Add in the Users or Group that should have this permission.
  13. Click Attach policy.

Usage

Run the control in your terminal:

powerpipe control run aws_compliance.control.cis_compute_service_v100_3_7

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run aws_compliance.control.cis_compute_service_v100_3_7 --share

SQL

This control uses a named query:

manual_control

Tags