View a markdown version of this page

Best practices for the Secrets Manager extension in AWS Systems Manager Cloud Extensions - AWS Systems Manager

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.

  1. 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.

  2. 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 refreshNow for a single read that must be current.

  3. Prefetch the secrets that you read most – Prefetch loads the secrets when the extension starts.

  4. Use roles for prefetch when you need them – Set Role ARN to fetch a secret with a different role than the extension uses.

  5. Use automatic rotation in Secrets Manager – Rotate secrets regularly.

  6. Use structured secrets – Store related values, such as a user name and password, as key-value pairs in one JSON secret.

  7. Handle credential changes in your application – Design applications to handle connection failures when credentials change.

  8. Review the capabilities – Before you save the extension, review the capabilities that the extension requires and the capabilities that your settings add.