Skip to content

Instantly share code, notes, and snippets.

@amcginlay
Last active February 21, 2022 14:57
Show Gist options
  • Save amcginlay/ba1efb92fc5f0e2ee4a4fc7ac91dec5d to your computer and use it in GitHub Desktop.
Save amcginlay/ba1efb92fc5f0e2ee4a4fc7ac91dec5d to your computer and use it in GitHub Desktop.
AWS Secrets Manager demo from the CLI
#!/bin/bash
unique_id=${RANDOM}
echo ${unique_id}
aws secretsmanager create-secret --name "/qa/dummy-key-${unique_id}" --secret-string "mY-5uP3R-53cr3t-v@lu3"
aws secretsmanager list-secrets
aws secretsmanager get-secret-value --secret-id "/qa/dummy-key-${unique_id}"
------------------------------------------------------------------------------
aws secretsmanager delete-secret --secret-id "/qa/dummy-key-${unique_id}" --recovery-window-in-days 7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment