I recently was getting ready for the Security Speciality Exam, and I got the question to choose between using the Parameter Store to store a secret database connection URL which could hold passwords or to use KMS encrypted environment variables in the Lambda.
IMO Environment Variables are preferable because otherwise for Lambda Functions which are invoked many thousands or hundreds of thousands of times a day, this could start to cost a considerable amount of cost or could even result in hitting account limits.
In addition there is added latency to fetching the parameter each invocation, which may not be significant but nevertheless adds up. In general I would love to see a reference syntax implemented for Lambda environment variables to resolve to AWS SSM parameter values similar to what has now been implemented for Cloudformation for both SSM and secrets manager.
But until then why is SSM preferred over using KMS encrypted environment variables, considering the increased cost and latency? (This is what I have seen recommended in practice exams)