Best practices for the Secrets Manager extension in AWS Systems Manager Cloud Extensions
Use the following practices to get secure, current secrets from the Secrets Manager extension.
-
Use signed requests for all callers where you can – Signing with SigV4 is the main protection of the extension. The default authentication, runtime credentials, uses signed requests. Turn off the server-side request forgery (SSRF) token header check only if every caller signs. Keep the check on if the authentication of the profile is
none. -
Choose the cache TTL deliberately – A longer time to live (TTL) makes fewer calls to Secrets Manager, and a shorter TTL returns changes sooner. Use
refreshNowfor a single read that must be current. -
Prefetch the secrets that you read most – Prefetch loads the secrets when the extension starts.
-
Use roles for prefetch when you need them – Set Role ARN to fetch a secret with a different role than the extension uses.
-
Use automatic rotation in Secrets Manager – Rotate secrets regularly.
-
Use structured secrets – Store related values, such as a user name and password, as key-value pairs in one JSON secret.
-
Handle credential changes in your application – Design applications to handle connection failures when credentials change.
-
Review the capabilities – Before you save the extension, review the capabilities that the extension requires and the capabilities that your settings add.