Interview Prep/AWS/CloudFormation, CloudWatch, KMS, Secrets and Cost

`aws ssm get-parameter --name /prod/db/password` returns an encrypted blob instead of the password.

BeginnerTroubleshootingCloudFormation, CloudWatch, KMS, Secrets and Cost
Answer

Likely causes → The parameter is a SecureString, and the call did not ask for decryption. If you add the flag and get AccessDeniedException, the caller has no kms:Decrypt on the key.

Diagnose →

aws ssm describe-parameters --parameter-filters Key=Name,Values=/prod/db/password --query 'Parameters[].[Type,KeyId]'

Fix →

aws ssm get-parameter --name /prod/db/password --with-decryption --query Parameter.Value --output text
aws ssm get-parameters-by-path --path /prod/db --recursive --with-decryption

Grant ssm:GetParameter* on arn:aws:ssm:...:parameter/prod/db/* and kms:Decrypt on the key.

Prevent → Scope parameter access by path per service, and use ParameterNotFound checks in startup code so missing config fails fast.

aws All AWS questions Roadmap: Cloud cost & architecture

More on CloudFormation, CloudWatch, KMS, Secrets and Cost