Key Management, Secrets Manager, and Parameter Store are three AWS services that protect your digital secrets and configuration data. They matter for the SCS-C02 because the exam tests your ability to choose the right storage location for different types of sensitive information, from database passwords to encryption keys.
Jump to a section
A simple way to picture Key Management, Secrets Manager, and Parameter Store
Because you need to protect sensitive information but also access it quickly, you need separate, specialised storage methods, each with its own level of security and accessibility.
Think of your company's most important digital items as physical objects in an office. First, you have a locked filing cabinet (Parameter Store). It's for things like game settings: the default resolution, the sound volume, the server IP address. It's handy and fast, but you wouldn't put the key to the office safe in there.
Next, you have a high-security safe in a bank vault (Secrets Manager). This is where you put the actual passwords and API keys, like the combination to the office main door that changes every 90 days. It's harder to reach (slower access), but it has an automatic lock-changing service. Finally, you have the government-style encryption key management service (Key Management Service). This doesn't store your data at all. It stores the master keys—the blueprints and special tools—that are used to create and control all other locks in the building. Without the master key blueprint, you cannot build a new lock for a new database. Each of these three storage methods solves a specific problem: Parameter Store is for quick settings, Secrets Manager is for automatic password rotation, and KMS is for controlling the cryptographic locks themselves.
In any computer system, you have information that must be kept secret, like a password for a database or a cryptographic key used to encrypt customer data. AWS offers three primary services to store and manage this sensitive information, each designed for a different job. Understanding the difference between them is critical for the SCS-C02 exam.
First, let's define 'Key Management' using AWS Key Management Service (KMS). AWS KMS is a managed service that lets you create and control encryption keys. An encryption key is a string of random characters used to scramble (encrypt) data so it becomes unreadable, and to unscramble (decrypt) it back to its original form. KMS does not store your data. It stores the keys that protect your data. You tell KMS 'create a key', and it gives you a reference to that key. When your application wants to encrypt data, it sends the data to KMS, KMS uses your key to encrypt it, and returns the encrypted version. You never see the plaintext of the encryption key itself. This is called 'envelope encryption', where a master key (in KMS) encrypts a data key that encrypts your actual data.
Second, AWS Secrets Manager is a service specifically for managing passwords, API keys, and other 'secrets'. An API key is a code used to identify a program or user calling an API (Application Programming Interface—a way for two programs to talk to each other). A database password is a secret word that allows a user or program to access a database. Secrets Manager securely stores these secrets and automatically rotates (changes) them on a schedule you define. For example, you can tell Secrets Manager to change a database password every 30 days, and it will update the password in the database and in the application's configuration automatically. This 'rotation' is the key feature that distinguishes Secrets Manager from Parameter Store. Secrets Manager has a higher cost per secret than Parameter Store.
Third, AWS Systems Manager Parameter Store is a service for storing configuration data and secrets. Configuration data includes things like database connection strings, URLs, or environment settings. A connection string includes the database address and sometimes a username. Parameter Store is a hierarchy of key-value pairs. For example, you can store a parameter called "/myapp/database/url" with a value of "mydatabase.example.com". You can then reference this parameter from other AWS services. Parameter Store has two tiers: Standard (free) and Advanced (small fee). Standard parameters have a 4KB size limit, while Advanced allows up to 8KB. Parameter Store supports storing plain text or encrypted values using KMS. It does not have automatic rotation built in; if you want to rotate a password stored in Parameter Store, you must call AWS Lambda yourself to change it.
Here are the main differences in a quick overview:
KMS: Stores encryption keys (master keys). Used for encrypting and decrypting data. Does not store passwords or secrets directly. Has a per-request cost.
Secrets Manager: Stores secrets (passwords, API keys). Supports automatic rotation of secrets. Higher cost per secret. Can generate random secrets automatically.
Parameter Store: Stores configuration data (strings) and secrets. Two tiers (Standard and Advanced). No built-in automatic rotation. Lower cost (Standard tier is free).
Why do these services exist? In the past, developers often hard-coded secrets directly into application code or configuration files. This was insecure because anyone who could read the code (or a backup) could find the password. If the password changed, every place it was used had to be manually updated. These AWS services solve this by providing a central, secure, and auditable place to store and manage secrets and keys. The security team can control who has access to each secret using IAM policies.
For the SCS-C02, you must remember the specific use cases for each. The exam loves to ask: 'When would you use Secrets Manager versus Parameter Store?' The answer often hinges on whether automatic rotation is needed. If a company needs to rotate its database password monthly, Secrets Manager is the correct answer. If a company needs to store a static application version number, Parameter Store is correct. For encryption key management, KMS is always the answer.
Identify the secret type
Determine whether the information is a cryptographic key, a secret needing rotation, or configuration data. This decides which AWS service (KMS, Secrets Manager, or Parameter Store) is appropriate.
Create the KMS key (if needed)
For encryption, go to the KMS console and create a symmetric customer-managed key. Define a key policy to control who can use and administer the key. This key will be referenced by other services.
Store a secret in Secrets Manager
If the secret (e.g., a database password) must be rotated automatically, create a secret in Secrets Manager. Specify the rotation schedule (e.g., 30 days) and the Lambda rotation function to update the target resource.
Store a parameter in Parameter Store
For configuration strings (e.g., database hostname, API version number) or static secrets, create a parameter in Systems Manager Parameter Store. Choose plaintext or secure string (encrypted with KMS). Set the tier based on size and cost needs.
Grant access via IAM roles and policies
Create an IAM role for the EC2 instance or Lambda function that needs to access the secret or parameter. Attach a policy that allows the specific actions (e.g., 'ssm:GetParameter', 'secretsmanager:GetSecretValue', 'kms:Decrypt'). Test that the application can retrieve the value.
Set up monitoring and auditing
Enable CloudTrail to log all API calls to KMS, Secrets Manager, and Parameter Store. Set up CloudWatch alarms for unusual activity (e.g., frequent Decrypt calls) to detect potential security incidents.
An IT professional at a mid-sized e-commerce company named 'ShopFast' is tasked with securing their application. They have a web server, a database, and a third-party payment processing service. The web server needs to connect to the database using a username and password. It also needs to call an API to process credit card payments, which requires an API key. Additionally, all customer data (including payment details) must be encrypted at rest in the database.
Step 1: The IT professional decides to use AWS KMS to create a master key. They go to the KMS console and create a new symmetric customer-managed key. They name it 'ShopFastDataKey'. This key will be used to encrypt the database and any S3 buckets. The KMS key's ID (a unique identifier) is used in the database encryption settings.
Step 2: For the database password, the IT professional chooses AWS Secrets Manager. They create a secret called 'ShopFastDBPassword'. They set the 'rotation' option to every 30 days. Secrets Manager automatically generates a strong password, stores it, and then updates the database's master user password. It also updates the application's configuration to use the new password. This automates a process that used to be manual and error-prone.
Step 3: For the payment processing API key, the IT professional initially considers Secrets Manager but realises that the API key is provided by the payment processor and cannot be automatically rotated by AWS (the payment processor controls the key). So they choose Parameter Store and store it as a secure string encrypted with KMS. They set a parameter "/shopfest/payments/api-key" with the encrypted value. They will manually update this parameter if the payment processor changes the key.
Step 4: For other configuration data, like the database hostname and port, they also use Parameter Store as plain text parameters. This way, the application reads all its configuration from a central place. They use IAM roles to grant the web server's EC2 instance permission to access only the specific parameters and the specific KMS key.
Step 5: The IT professional sets up CloudTrail (AWS's audit logging service) to log all API calls to KMS, Secrets Manager, and Parameter Store. This creates an audit trail: if someone tries to decrypt data, the action is logged. This satisfies compliance requirements like PCI DSS (Payment Card Industry Data Security Standard).
The daily reality for this professional includes checking CloudTrail logs for unusual 'Decrypt' requests, verifying that Secrets Manager rotated the database password successfully, and managing KMS key policies to ensure only the necessary services can use the key. They must also keep the 'Key Management Service (KMS) key ID' safe—if it's deleted, all data encrypted with it becomes permanently unreadable.
The SCS-C02 exam devotes significant attention to differentiating these three services. The exam is not testing your ability to describe them in general; it tests your ability to choose the right service for a specific scenario mentioned in the question.
Exam topics include:
- When to use Secrets Manager vs. Parameter Store: The key differentiator is automatic rotation. If the scenario mentions 'the password must be changed every 30 days automatically', the answer is Secrets Manager. If it says 'store configuration data like the URL of an internal service', the answer is Parameter Store. - KMS key types: Symmetric vs. asymmetric keys. Symmetric keys use the same key for encryption and decryption. Asymmetric keys use a public/private key pair. The exam often asks when to use asymmetric keys (for digital signing or encryption by external parties who cannot access the private key). - KMS key origins: AWS managed (created and managed by AWS for you, often used for services like S3 or EBS), Customer managed (you create and control the policy), and Custom key store (CloudHSM—you generate the key in your own hardware security module). - Envelope encryption: Understanding that KMS has a 1MB data limit per encrypt/decrypt request. For larger data, you must generate a data key (using KMS GenerateDataKey API), encrypt your data locally with that data key, and then delete the plaintext data key. The exam tests the 'GenerateDataKey' concept. - Key policies and IAM policies: The difference between key policies (resource-based policies attached to the KMS key itself) and IAM policies (identity-based policies attached to users/roles). A key policy can explicitly deny access even if an IAM policy allows it. - Rotation of KMS keys: Automatic key rotation (yearly) is available for customer-managed keys. The exam tests that automatic rotation creates new backing keys but preserves the same key ID. It does not change the KMS key ID, so it is transparent to applications. - Secrets Manager rotation: The exam tests that rotation uses an AWS Lambda function. You must configure the Lambda function to change the secret in both Secrets Manager and the target service (like a database). Common exam traps:
- A question describes a scenario that could fit Parameter Store, but the question explicitly mentions 'automatic rotation'. The correct answer is Secrets Manager. - A question describes 'encrypting files larger than 1MB' and asks what to use. The trap answer is 'use KMS Directly'—the correct answer is to use KMS GenerateDataKey with envelope encryption. - A question asks about 'key rotation ensures security' but the real trap is that rotation does not protect against a key that is already compromised (rotation only protects future data). - A scenario about storing a non-secret value like 'a list of AWS regions'—the answer is Parameter Store, not Secrets Manager. Concepts to memorise:
KMS key IDs: unique identifier for a key.
Secrets Manager secret: contains a version label and a version ID.
Parameter Store paths: hierarchical like filesystem paths (e.g., /app/db/username).
CloudTrail: logs all KMS API calls and Secrets Manager calls.
AWS KMS stores and manages cryptographic encryption keys, not passwords or secrets, and is used for encrypting and decrypting data up to 1MB directly.
AWS Secrets Manager is designed for secrets that require automatic rotation, such as database passwords and API keys, and uses a Lambda function to perform the rotation.
AWS Systems Manager Parameter Store is for configuration data and secrets, with two tiers (Standard and Advanced), but lacks built-in automatic rotation.
When a KMS key is rotated automatically (once per year), the key ID remains the same but a new cryptographic backing key is created; existing encrypted data remains accessible.
For encrypting data larger than 1MB with KMS, you must use the GenerateDataKey API to get a data key and then perform local envelope encryption.
KMS key policies are resource-based policies that are attached directly to the key and can override IAM policies, allowing for fine-grained access control.
CloudTrail logs all API calls to KMS, Secrets Manager, and Parameter Store, providing an audit trail that is essential for compliance and security investigations.
These come up on the exam all the time. Here's how to tell them apart.
KMS (Key Management Service)
Stores cryptographic encryption keys (master keys).
Used to encrypt and decrypt data directly (up to 1MB).
Does not store passwords or API keys.
Secrets Manager
Stores secrets like passwords, API keys, database credentials.
Primarily for secret retrieval, not direct encryption of data.
Integrates with KMS to encrypt secrets at rest.
Secrets Manager
Built-in automatic rotation of secrets via Lambda functions.
Higher cost per secret (monthly charge).
Supports random secret generation (GenerateRandomPassword).
Parameter Store (Systems Manager)
No built-in automatic rotation (must be custom-built).
Standard tier is free; Advanced tier has small fee.
Primarily for configuration strings (plaintext or encrypted).
Customer-Managed KMS Key
You create and control the key policy and rotation schedule.
Can be disabled, scheduled for deletion, or rotated manually.
Costs $1/month per key (plus usage fees).
AWS Managed KMS Key
Created and managed by AWS on your behalf (e.g., for S3, EBS).
Cannot be deleted or its policy changed by you.
No monthly key cost (usage fees still apply).
Symmetric KMS Key
Same key used for both encryption and decryption.
Used for bulk encryption and decryption of data.
Commonly used with envelope encryption.
Asymmetric KMS Key
Uses a public key for encryption and a private key for decryption (or signing).
Used when external parties need to encrypt data without access to the private key.
Can be used for digital signing and verification.
Envelope Encryption (KMS with Data Key)
Data larger than 1MB can be encrypted.
Involves generating a data key, encrypting locally, and discarding the plaintext data key.
Faster for large datasets as KMS is called only once to generate the data key.
Direct KMS Encryption
Limited to data up to 1MB per call.
KMS performs the encryption/decryption directly.
Simpler for small amounts of data (no local key management).
Mistake
Parameter Store can automatically rotate secrets like Secrets Manager.
Correct
Parameter Store has no built-in automatic rotation. To rotate a secret stored in Parameter Store, you must write a custom Lambda function and schedule it to run.
Both services store secrets, so beginners assume they share all features. The subtle marketing similarity ('store a secret') leads to confusion about rotation capability.
Mistake
KMS stores passwords and API keys.
Correct
KMS stores encryption keys (master keys), not passwords or API keys. It manages cryptographic operations, not secrets management. Secrets are stored in Secrets Manager or Parameter Store.
The name 'Key Management' sounds like it manages all kinds of keys (like API keys), but 'key' in 'Key Management Service' refers specifically to cryptographic keys, not access tokens or passwords.
Mistake
You should always use Secrets Manager because it is more secure than Parameter Store.
Correct
Security depends on implementation. Both can store encrypted secrets using KMS. The choice depends on features (rotation, cost, size limits) and requirements, not a blanket security hierarchy.
Marketing positions Secrets Manager as the 'premium' option, leading to the belief that it is universally better. In reality, Parameter Store is perfectly adequate (and free) for many static secrets.
Mistake
If you rotate a KMS key, all old data encrypted with that key becomes unreadable.
Correct
Rotating a KMS key creates a new backing key, but old data encrypted with the previous backing key can still be decrypted. Rotation protects future data, not past data. The key ID remains the same.
Beginners confuse key rotation with password rotation, where the old password stops working. KMS key rotation is transparent to the application—it does not break existing encrypted data.
Mistake
You can encrypt data larger than 1MB directly with KMS.
Correct
KMS has a 1MB limit for direct Encrypt/Decrypt API calls. For larger data, you must use GenerateDataKey (to get a data key) and encrypt the data locally with that data key (envelope encryption).
The KMS service is designed for key management, not bulk data encryption. Its 1MB limit is a hard technical limit, not a performance suggestion, so it is a common exam trap.
Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.
Secrets Manager has built-in automatic rotation of secrets and costs per secret, while Parameter Store is cheaper (Standard tier is free) but does not automatically rotate secrets. Choose Secrets Manager when you need rotation; choose Parameter Store for static configuration or cost-sensitive cases.
No, KMS stores and manages encryption keys, not passwords. It is used to encrypt and decrypt data. Store passwords in Secrets Manager or Parameter Store.
No. Automatic KMS key rotation creates a new backing key, but the old backing key is still retained for decryption. Your encrypted data remains accessible because KMS can still decrypt using the old key. The key ID also stays the same.
You cannot encrypt a file larger than 1MB directly with the KMS Encrypt API. Instead, use the GenerateDataKey API to get a symmetric data key, then encrypt the large file locally using that data key (envelope encryption).
A key policy is a resource-based policy attached directly to a KMS key. An IAM policy is attached to a user, role, or group. A key policy can grant permissions to principals (users/roles) regardless of their IAM policies, and it can explicitly deny access even if an IAM policy allows it.
Parameter Store does not have a built-in expiration feature for parameters. For secrets that need expiration or automatic rotation, use Secrets Manager.
You've finished Key Management, Secrets Manager, and Parameter Store. Continue through the SCS-C02 study guide to build a complete picture of the exam.
Done with this chapter?