

# 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`.

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

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

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

1. **Use automatic rotation in Secrets Manager** – Rotate secrets regularly.

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

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

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