|
|
|
|
|
by mratzloff
3004 days ago
|
|
Well, you can use KMS to do something similar, but without the auto-rotation. 1. Use a KMS key to encrypt a secrets file (obviously, never check this into source control) 2. Store the encrypted secrets file in an S3 bucket 3. Tie a new IAM role with kms:Decrypt and s3:GetObject policies for the relevant resources to your EC2 instance 4. On app start, get the KMS key and secrets file, decrypt, and set environment variables In practice, rotating using this scheme just means creating a new KMS key, re-encrypting the file and pushing the updated copy to S3, and updating the IAM role's kms:Decrypt policy. It's not too bad unless you have a million services. |
|