diff --git a/docs/commands/secrets.md b/docs/commands/secrets.md index 494bdb2..d5d50c3 100644 --- a/docs/commands/secrets.md +++ b/docs/commands/secrets.md @@ -94,3 +94,26 @@ kamal secrets fetch --adapter bitwarden --account email@example.com MyItem/REGIS kamal secrets extract REGISTRY_PASSWORD kamal secrets extract MyItem/REGISTRY_PASSWORD ``` + +## AWS Secrets Manager + +First, install and configure [the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html). + +Use the adapter `aws_secrets_manager`: + +```bash +# Fetch passwords +kamal secrets fetch --adapter aws_secrets_manager --account default REGISTRY_PASSWORD DB_PASSWORD + +# Fetch passwords from an item +kamal secrets fetch --adapter aws_secrets_manager --account default --from myapp/ REGISTRY_PASSWORD DB_PASSWORD + +# Fetch passwords from multiple items +kamal secrets fetch --adapter aws_secrets_manager --account default myapp/REGISTRY_PASSWORD myapp/DB_PASSWORD + +# Extract the secret +kamal secrets extract REGISTRY_PASSWORD +kamal secrets extract MyItem/REGISTRY_PASSWORD +``` + +**Note:** The `--account` option should be set to your AWS CLI profile name, which is typically `default`. Ensure that your AWS CLI is configured with the necessary permissions to access AWS Secrets Manager.