Encrypt Text
The encrypt
command is used to encrypt sensitive information using a managed encryption key. The encryption key is selected by using the --key
option.
Options
--key <KEY-ID>
-
Specify encryption key ID or alias to use (default: use default deployment tier key)
--decrypt
-
(optional) Decrypt value before encrypting it
--tier|-T <NAME>
-
(optional) Name of deployment tier (default:
LAMBDASHARP_TIER
environment variable) --aws-profile|-P <NAME>
-
(optional) Use a specific AWS profile from the AWS credentials file
--aws-region <NAME>
-
(optional) Use a specific AWS region (default: read from AWS profile)
--verbose|-V[:<LEVEL>]
-
(optional) Show verbose output (0=Quiet, 1=Normal, 2=Detailed, 3=Exceptions; Normal if LEVEL is omitted)
--no-ansi
-
(optional) Disable colored ANSI terminal output
--quiet
-
(optional) Don't show banner or execution time
--no-beep
-
(optional) Don't emit beep when finished
Examples
Encrypt file using a specific key
Using PowerShell/Bash:
lash encrypt --key alias/MySecretKey --tier Sandbox < api-key.txt
Output:
LambdaSharp CLI (v0.5) - Encrypt Value
AQICAHh7n6rans2ZnBXULLCW2KSdUUy7RTem4YuI0CcwDz0FoQHUw/OCuEEIRMyqYb0pR9WBAAAAcjBwBgkqhkiG9w0BBwagYzBhAgEAMFwGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMOIUjrz5+SAYgcVsWAgEQgC+ZetbV40nNwQFf3CMWJkEdoDrfECWor3TwSMogNcTgFSknmXYElw3+xo1y2qIGqw==
Done (finished: 1/18/2019 1:23:54 PM; duration: 00:00:00.9146055)