Skip to content

Latest commit

 

History

History
69 lines (50 loc) · 1.39 KB

getting-started-aws.md

File metadata and controls

69 lines (50 loc) · 1.39 KB

Getting Started with AWS

This document describes step by step guide how to use crypt with AWS KMS.

AWS KMS uses client from AWS SDK for Go. You can either run aws configure (if you don't have ~/.aws/credentials already) or set environment variables. To set AWS profile use --profile parameter.

Encryption

stdin

Example usage with stdin:

echo "top secret" | crypt encrypt aws \
    --out file.enc \
    --region eu-west-1 \
    --kms alias/test

Single file

echo "top secret" > file.txt

crypt encrypt aws \
    --in file.txt \
    --out file.enc \
    --region eu-west-1 \
    --kms alias/test

Files in directory

crypt encrypt aws \
    --indir to-encrypt \
    --outdir encrypted \
    --region eu-west-1 \
    --kms alias/test

In directory encrypted you should have encrypted files with extension .crypt.

Decryption

Single file

crypt decrypt aws \
    --in file.enc \
    --out file.dec \
    --region eu-west-1

Files in directory

crypt decrypt aws \
   --indir to-decrypt \
   --outdir decrypted \
   --region eu-west-1

This command scan all files with extension .crypt in folder to-decrypt and decrypts it to decrypted folder. Decrypted files doesnt't have .crypt extension.