| name | cis-aws-compute-5.8 |
| description | Ensure Lightsail instances are attached to the buckets |
| category | cis-compute |
| version | 1.1.0 |
| author | cyberstrike-official |
| tags | ["cis","aws","compute","lightsail","buckets","storage","resource-access","instances"] |
| cis_id | 5.8 |
| cis_benchmark | CIS AWS Compute Services Benchmark v1.1.0 |
| tech_stack | ["aws"] |
| cwe_ids | [] |
| chains_with | ["cis-aws-compute-5.7","cis-aws-compute-5.9","cis-aws-compute-5.10"] |
| prerequisites | [] |
| severity_boost | {} |
5.8 Ensure Lightsail instances are attached to the buckets (Manual)
Description
Attaching an Amazon Lightsail instance to a Lightsail storage bucket gives it full programmatic access to the bucket and its objects.
Rationale
When you attach instances to buckets, you don't have to manage credentials like access keys. Resource access is ideal if you're configuring software or a plugin on your instance to upload files directly to your bucket. For example, if you want to configure a WordPress instance to store media files on a bucket configuration with bucket storage resource access allows for that securely.
Impact
You can attach instances that are in a running state only. Additionally, the instances have to be in the same AWS Region as the bucket or the buckets have to be in the same region as the instances.
Audit Procedure
Using AWS Console
- Login to AWS Console using https://console.aws.amazon.com
- Click
All services, click Lightsail under Compute.
- This will open up the Lightsail console.
- Select
Storage.
- All Lightsail buckets are listed here.
- Click on a bucket name
- Click
Permissions.
- Scroll down to
Resource access and confirm that your instance is attached.
- If the instance using this Storage bucket is not attached refer to the remediation below.
Using AWS CLI
- Run
aws lightsail get-buckets
aws lightsail get-buckets
This command will provide a list of Buckets tied to Lightsail.
- If there are no buckets listed then refer to the remediation below.
Expected Result
Lightsail instances that need bucket access should be attached to their respective storage buckets via resource access, eliminating the need for access key management.
Remediation
Using AWS Console
- Login to AWS Console using https://console.aws.amazon.com
- Click
All services, click Lightsail under Compute.
- This will open up the Lightsail console.
- Confirm that the
instance you want to connect to the Storage bucket is in a running state
- If it is move on to Step 6. If it is not click on the instance name, then click on . Wait for the status to read