A large number of free, public API keys. Using lambda environment variable with encyption, other developer/admin can still expose their plaintext value right in the lambds console.
For the issue of developers being able to see the environment variables in the console, you can use a non-default KMS CMK, and configure permissions on that key so that the other developers can't use it (doc). They will still be able to see the rest of the Lambda configuration.
A bigger issue is how you will configure these environment variables. If you're using Terraform, for example, the configuration is written to the state file, and you will need to use external state (stored in S3 or on HashiCorp's servers) to secure it. If you're using CloudFormation, you can configure them using a dynamic reference to a Secrets Manager secret, but not to a Parameter Store secure string.
One other choice is to use the environment variables to reference parameter store keys, and then programmatically retrieve the values. For example, you have an environment variable named DATABASE_PASSWORD
, and its value is /dev/database/password
; the actual database password is a SecureString in Parameter Store, accessed via that path.
Login credentials to a third party platform. I assume that Secrets Manager is the only option?
Parameter store also provides a SecureString.
DB Connection strings. Secrets Manager? At $0.40/secret/month, the bill would add up for hundreds of DBs for simply storing credentials.
Does your application actually connect to hundreds of DBs? If yes, is $40/month (for 100 connections) really a financial hardship for your company?
If yes, then Parameter Store might be the best choice, but beware that there are a limited number of "free" parameters per account.