Control: 4.3 Ensure AWS Secrets manager is configured and being used by Lambda for databases
Description
Lambda functions often have to access a database or other services within your environment.
Credentials used to access databases and other AWS Services need to be managed and regularly rotated to keep access into critical systems secure. Keeping any credentials and manually updating the passwords would be cumbersome, but AWS Secrets Manager allows you to manage and rotate passwords.
Remediation
From the Console:
- Login to AWS Console using https://console.aws.amazon.com.
- Click
All services
, clickSecrets Manager
under Security, Identity and Compliance. - Click on
Secrets
. - Click on
Store a new secret
. - Select the
Secret type
. - Enter the information.
For the `3 db types` listed enter the credentials and select the database.For `other database` enter the credentials, select the db type and enter theconnection parameters.
For Other type of secret
(Lambda) create the keys and values used. - example
Username yepyep Password yepyep choose an encryption key or create a new one if you add a new key it will take you to the KMS console. Once you create the new key you can then select it here.
- Click
Next
. - Give the secret a name associated with your organization style and lambda.
- Click
Next
. - Configure the auto rotation.
Rotation schedule leave as defaultSelect the lambda function you use to rotate the key
- Click
Next
. - Review all the settings.
- Click
Store
.
Usage
Run the control in your terminal:
powerpipe control run aws_compliance.control.cis_compute_service_v100_4_3
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_compliance.control.cis_compute_service_v100_4_3 --share
SQL
This control uses a named query:
manual_control