From 1ee13552d3d45660408751327d242bc467f0af3b Mon Sep 17 00:00:00 2001 From: Justin Dell Date: Mon, 21 Oct 2024 09:23:56 -0500 Subject: [PATCH 1/2] documentation for aws secrets manager --- docs/commands/secrets.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/commands/secrets.md b/docs/commands/secrets.md index 494bdb2..eabba46 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_secretsmanager`: + +```bash +# Fetch passwords +kamal secrets fetch --adapter aws_secretsmanager --account default REGISTRY_PASSWORD DB_PASSWORD + +# Fetch passwords from an item +kamal secrets fetch --adapter bitwarden --account default --from myapp/ REGISTRY_PASSWORD DB_PASSWORD + +# Fetch passwords from multiple items +kamal secrets fetch --adapter bitwarden --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. From c5e72d36323a0e07a0c414ed7d3c6d564eb45756 Mon Sep 17 00:00:00 2001 From: Justin Dell Date: Mon, 4 Nov 2024 09:48:15 -0600 Subject: [PATCH 2/2] rename aws_secretsmanager to aws_secrets_manager --- docs/commands/secrets.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/commands/secrets.md b/docs/commands/secrets.md index eabba46..d5d50c3 100644 --- a/docs/commands/secrets.md +++ b/docs/commands/secrets.md @@ -99,17 +99,17 @@ kamal secrets extract MyItem/REGISTRY_PASSWORD First, install and configure [the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html). -Use the adapter `aws_secretsmanager`: +Use the adapter `aws_secrets_manager`: ```bash # Fetch passwords -kamal secrets fetch --adapter aws_secretsmanager --account default REGISTRY_PASSWORD DB_PASSWORD +kamal secrets fetch --adapter aws_secrets_manager --account default REGISTRY_PASSWORD DB_PASSWORD # Fetch passwords from an item -kamal secrets fetch --adapter bitwarden --account default --from myapp/ REGISTRY_PASSWORD DB_PASSWORD +kamal secrets fetch --adapter aws_secrets_manager --account default --from myapp/ REGISTRY_PASSWORD DB_PASSWORD # Fetch passwords from multiple items -kamal secrets fetch --adapter bitwarden --account default myapp/REGISTRY_PASSWORD myapp/DB_PASSWORD +kamal secrets fetch --adapter aws_secrets_manager --account default myapp/REGISTRY_PASSWORD myapp/DB_PASSWORD # Extract the secret kamal secrets extract REGISTRY_PASSWORD