How to do it...

  1. Create a KMS key, and take note of the Key ID returned:
        aws kms create-key --query 'KeyMetadata.KeyId' --output text
  1. Create an alias for the key:
Unicreds uses the alias/credstash alias to make it compatible with Credstash.
        aws kms create-alias --alias-name 'alias/credstash' \        --target-key-id "<your-key-id>"
  1. Set up the resources required by Unicreds:
        unicreds setup
  1. Store a secret using the put command:
        unicreds put foo bar
  1. Get the secret using the get command:
        unicreds get foo

Get AWS Administration Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.