Data Protection Operations: KMS, ACM, Secrets Manager and Parameter Store for Keys, Certificates and Secrets

AWS SysOps Associate 55 min min read Updated: Nov 17, 2026 Intermediate
Data Protection Operations: KMS, ACM, Secrets Manager and Parameter Store for Keys, Certificates and Secrets
Intermediate Topic 2 of 4

AWS KMS

ConceptMeaning
KMS key (CMK)Logical key in KMS. Material never leaves KMS unencrypted. Used to encrypt up to 4 KB directly or to protect data keys
AWS owned keysManaged by AWS services internally, invisible, free
AWS managed keysaws/s3, aws/ebs... created for you. Automatic rotation yearly, you cannot edit the key policy
Customer managed keysYou control policy, rotation, enable/disable, deletion, tags, aliases. Small monthly fee plus API cost
Symmetric vs asymmetricSymmetric (AES-256-GCM) default. Asymmetric RSA/ECC for sign/verify or encrypt outside AWS
HMAC keysGenerate and verify MACs
Data keyGenerated with GenerateDataKey. You encrypt data locally with the plaintext data key and store the encrypted data key beside the data (envelope encryption)
AliasFriendly name alias/app-prod that can be repointed
Multi-Region keysSame key id and material replicated to other Regions (for DR, global tables, cross-Region decrypt)
Key store optionsKMS standard, CloudHSM-backed custom key store, external key store (XKS)
bash aws kms create-key --description "app data" --key-usage ENCRYPT_DECRYPT aws kms create-alias --alias-name alias/app-prod --target-key-id <key-id> aws kms enable-key-rotation --key-id <key-id> aws kms get-key-rotation-status --key-id <key-id> aws kms encrypt --key-id alias/app-prod --plaintext fileb://secret.txt --query CiphertextBlob --output text | base64 -d > secret.enc aws kms schedule-key-deletion --key-id <key-id> --pending-window-in-days 30 # 7 to 30 days, can be cancelled aws kms disable-key --key-id <key-id>

Key Policies, IAM and Grants

  • A KMS key must have a key policy. If the policy does not allow IAM to manage access (kms:* to the account root principal), IAM policies alone have no effect. The default policy delegates to IAM
  • To use a key a principal needs permission in the key policy or IAM (or a grant). Cross-account use needs both the key policy in the key's account and an IAM allow in the caller's account
  • Grants give temporary, programmatic delegation (used by EBS, RDS, and similar services). Retire when done
  • Encryption context: extra authenticated key/value pairs that must match on decrypt, also shown in CloudTrail and usable in conditions
  • Use **kms:ViaService and kms:CallerAccount** conditions to restrict a key to specific services and accounts
  • Every API call is logged to CloudTrail
RotationBehavior
AutomaticCustomer managed symmetric keys: new key material yearly (configurable period), same key ID and ARN, old material kept to decrypt old data. No app change
ManualCreate a new key, update the alias, re-encrypt as needed. Needed for asymmetric and imported keys
Imported key materialYou supply the material, can expire, no automatic rotation
KMS problemFix
AccessDeniedException using a keyKey policy and IAM policy, grants, condition keys, cross-account both sides, key not disabled
DisabledException / KMSInvalidStateExceptionKey disabled or pending deletion. Enable or cancel deletion
EBS/RDS/S3 stops working after key changeServices lost permission or key deleted. Deleting a key makes data unrecoverable
ThrottlingExceptionRequest quota per Region (shared). Use data key caching, S3 Bucket Keys, request increase
Cross-Region copy of encrypted snapshot failsDestination KMS key must be in the destination Region and permitted

AWS Certificate Manager (ACM)

TopicNotes
Public certificatesFree. Use with ELB, CloudFront, API Gateway. Not exportable, so they do not install directly on EC2 (use exportable certificates feature or a private CA, or put the ELB in front)
ValidationDNS validation (add a CNAME in Route 53, enables automatic renewal) preferred over email
RenewalManaged certificates renew automatically when validation CNAME stays in place and the cert is in use
RegionRegional. CloudFront needs the certificate in us-east-1
Private CAAWS Private CA issues private certificates for internal services and devices (paid)
Imported certificatesYou manage renewal. ACM sends expiry events (45, 30 days...). Use EventBridge and the Config rule acm-certificate-expiration-check
bash aws acm request-certificate --domain-name app.example.com --subject-alternative-names "*.example.com" --validation-method DNS aws acm describe-certificate --certificate-arn <arn> --query 'Certificate.[Status,DomainValidationOptions[].ResourceRecord]' aws acm list-certificates --certificate-statuses ISSUED PENDING_VALIDATION
ACM problemFix
Stuck PENDING_VALIDATIONDNS CNAME missing or in wrong zone, or email not approved
Certificate not visible in CloudFrontRequest it in us-east-1
Renewal failedValidation record deleted, certificate not in use, domain no longer resolves
Browser NET::ERR_CERT_COMMON_NAME_INVALIDDomain name not covered by SANs

AWS Secrets Manager

  • Stores secrets (database credentials, API keys) encrypted with KMS, with versions and staging labels (AWSCURRENT, AWSPREVIOUS, AWSPENDING)
  • Automatic rotation using a Lambda function (ready-made for RDS, Aurora, Redshift, DocumentDB). Rotation steps: createSecret → setSecret → testSecret → finishSecret. The Lambda must reach both Secrets Manager and the database (VPC/endpoint) and the secret must be in the same Region
  • Managed master passwords for RDS/Aurora handle rotation without your own Lambda
  • Resource policy for cross-account access, replication to other Regions, tags, and CloudTrail audit
  • Retrieve in code with the SDK (cache the value) or via ECS/EKS/Lambda integrations and CloudFormation dynamic references
  • Cost: per secret per month plus API calls
bash aws secretsmanager create-secret --name prod/db/app --secret-string '{"username":"app","password":"change-me"}' aws secretsmanager get-secret-value --secret-id prod/db/app --query SecretString --output text aws secretsmanager rotate-secret --secret-id prod/db/app --rotation-lambda-arn $LAMBDA --rotation-rules AutomaticallyAfterDays=30 aws secretsmanager replicate-secret-to-regions --secret-id prod/db/app --add-replica-regions Region=ap-southeast-1

Systems Manager Parameter Store

Parameter StoreSecrets Manager
TypesString, StringList, SecureString (KMS)Secret string/binary
RotationNo built-in rotationBuilt-in rotation
CostStandard tier free, advanced tier paidPer secret per month
Size4 KB (8 KB advanced)64 KB
Cross-account sharingAdvanced tier with RAMResource policy
Hierarchy and historyYes (/prod/app/db), versionsVersions with labels
Best forConfiguration and simple secretsCredentials needing rotation, cross-Region replication

CloudHSM

  • Dedicated FIPS 140-2 Level 3 hardware security modules in your VPC that you control (AWS cannot see keys). Use for strict compliance, custom key stores, or crypto APIs (PKCS#11, JCE, CNG)
  • Create a cluster across AZs for availability. You manage users and backups

Practice Tasks

  1. Create a customer managed key with rotation and a restrictive key policy
  2. Encrypt an S3 bucket and an EBS volume with the key and watch the Decrypt events in CloudTrail
  3. Request an ACM certificate with DNS validation and attach it to an ALB
  4. Create a secret with 30-day rotation for an RDS database
  5. Move an application's configuration into Parameter Store and read it with a role

Conclusion

Use KMS keys with careful key policies (and rotation) for encryption, ACM for free, auto-renewed TLS certificates on ELB, CloudFront (us-east-1) and API Gateway, Secrets Manager for rotated credentials, Parameter Store for configuration, and CloudHSM only when you need dedicated hardware control.

Quick Summary: KMS; policies and grants; rotation; ACM; Secrets Manager; Parameter Store; CloudHSM.

Get Newsletter

Subscibe to our newsletter and we will notify you about the newest updates on Edugators