# Secrets Manager and Parameter Store

> Store database passwords, API keys and configuration securely, rotate them automatically and inject them into apps without hardcoding. Free notes, key...

Canonical: https://www.internhack.in/roadmaps/tracks/cloud-engineer/secrets-management
Last updated: 2026-11-28

Store database passwords, API keys and configuration securely, rotate them automatically and inject them into apps without hardcoding.

Intermediate · about 3 hours · difficulty 2/5

Learn first: [Encryption with AWS KMS](https://www.internhack.in/roadmaps/tracks/cloud-engineer/kms-encryption)

Hardcoded passwords in code, Docker images or Terraform files are among the most common findings in security reviews. AWS gives you two managed places to keep them. Azure Key Vault and Google Secret Manager are the equivalents.

### AWS Secrets Manager

- Stores secrets encrypted with KMS, with fine-grained IAM access.
- **Automatic rotation** using Lambda, with built-in support for RDS, Aurora and Redshift credentials.
- Cross-region replication for DR.
- Priced per secret per month plus API calls.

### SSM Parameter Store

- Hierarchical parameters (/myapp/prod/db_host) as String, StringList or **SecureString** (KMS-encrypted).
- **Standard parameters are free**, which makes it ideal for configuration and simple secrets in labs.
- No built-in rotation.

### Getting secrets into apps

- **ECS**: reference secrets in the task definition; they are injected as environment variables at start.
- **Lambda**: use the Parameters and Secrets Lambda Extension or the SDK, and cache values.
- **EKS**: the Secrets Store CSI Driver or External Secrets Operator.
- **CI/CD**: fetch at deploy time with the pipeline's role, never echo them in logs.

### Pitfalls

- Plain-text secrets in Lambda environment variables visible in the console.
- Granting secretsmanager:GetSecretValue on all secrets instead of specific ARNs or paths.
- Rotation that updates the database password but not the running app connection pool.

You are ready to move on when your app reads its database password from Secrets Manager or Parameter Store at runtime and nothing secret is left in your Git history.

## Key concepts

- **Secrets Manager**
- **Automatic rotation**
- **Parameter Store SecureString**
- **Parameter hierarchies**
- **Injecting secrets into ECS and Lambda**
- **External Secrets for Kubernetes**

## Mini project

Move every config value and secret from your serverless or container project into Parameter Store (free standard SecureString parameters) under /notes-app/dev/, grant the app role read access to that path only, and remove all secrets from code and environment variables. Delete the parameters when you tear down the app.

## Check yourself

When would you pay for Secrets Manager instead of using free Parameter Store SecureStrings?

## Free resources

- [AWS Secrets Manager documentation](https://docs.aws.amazon.com/secretsmanager/) (AWS)
- [AWS Systems Manager Parameter Store](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-parameter-store.html) (AWS)

Previous: [Encryption with AWS KMS](https://www.internhack.in/roadmaps/tracks/cloud-engineer/kms-encryption) · Next: [GuardDuty, Security Hub and Inspector](https://www.internhack.in/roadmaps/tracks/cloud-engineer/threat-detection)

## More in Cloud Security Services

- [Encryption with AWS KMS](https://www.internhack.in/roadmaps/tracks/cloud-engineer/kms-encryption)
- [Secrets Manager and Parameter Store](https://www.internhack.in/roadmaps/tracks/cloud-engineer/secrets-management)
- [GuardDuty, Security Hub and Inspector](https://www.internhack.in/roadmaps/tracks/cloud-engineer/threat-detection)
- [Edge Protection with WAF and Shield](https://www.internhack.in/roadmaps/tracks/cloud-engineer/waf-shield)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [Cloud Engineer (AWS) Roadmap](https://www.internhack.in/roadmaps/tracks/cloud-engineer)
