AWS Secrets Manager
Cloud service · AWS · Updated

AWS Secrets Manager

In short

AWS Secrets Manager is a service provided by Amazon Web Services that enables users to securely store, manage, and retrieve sensitive information such as API keys, passwords, and database credentials.

Cloud Services Hub →

8 key features of AWS Secrets Manager

AWS Secrets Manager offers secure storage, automated rotation, fine-grained access control, centralized management, cross-region and cross-account access, detailed auditing and monitoring, and extensive third-party integrations for managing sensitive secrets.

01
Secure Secret Storage

AWS Secrets Manager securely stores all types of secrets, including database credentials, API keys, and access tokens, ensuring that sensitive information is encrypted and managed throughout its lifecycle.

02
Secret Rotation

Automatically rotates secrets on a scheduled basis or on-demand, helping to maintain security and compliance by replacing old secrets with new ones without disrupting applications.

03
Fine-Grained Access Control

Integrates with AWS Identity and Access Management (IAM) to control who can manage or retrieve secrets, enabling detailed authorization for each secret based on roles, identities, and policies.

04
Centralized Management

Provides a centralized interface to manage secrets across AWS services and your applications, simplifying the management of secrets at scale and reducing the risk of secrets getting out of sync.

05
Cross-Region and Cross-Account Access

Enables access to secrets across different AWS regions and accounts, facilitating secure and efficient management of secrets for applications and services deployed in multiple environments.

06
Audit and Monitoring

Integrates with AWS CloudTrail and AWS CloudWatch to provide detailed logging and monitoring of secrets access and usage, enabling compliance and aiding in forensic analysis.

07
Third-Party Integrations

Supports integration with third-party applications and services, extending secret management capabilities beyond AWS resources and into your broader IT ecosystem.

08
KMS Key Selection

Secrets Manager uses envelope encryption with AWS KMS keys and data keys. When creating a secret, you can choose a symmetric customer managed key in the same AWS account and Region or use the AWS managed key for Secrets Manager.

Where AWS Secrets Manager is used

AWS Secrets Manager enables secure storage, rotation, and access of database credentials, API keys, and other secrets, integrates with AWS services for seamless operations, provides centralized management and detailed auditing, and supports third-party API key management.

  1. 01
    Securely Manage Database Credentials

    AWS Secrets Manager securely stores, rotates, and retrieves database credentials, API keys, and other secrets. It automates the rotation process without requiring code changes, enhancing security and minimizing the risk of unauthorized access.

  2. 02
    Integration with AWS Services

    It enables seamless integration with other AWS services, such as RDS for database secrets, Lambda for serverless applications, and IAM for providing fine-grained access control to secrets. This ensures a secure and efficient way to manage credentials across a varied AWS environment.

  3. 03
    Centralized Secrets Management

    AWS Secrets Manager provides a single, centralized secrets management system. This unified approach simplifies the management of secrets for applications distributed across different regions and accounts, enabling consistent policies and access controls.

  4. 04
    Auditing and Monitoring

    With AWS Secrets Manager, enterprises can enable detailed auditing and monitoring of secrets access. By integrating with AWS CloudTrail, it offers visibility into the use of secrets, helping meet compliance requirements and detect unauthorized access or rotations.

  5. 05
    Managing Third-Party API Keys

    Besides AWS resources, AWS Secrets Manager can store and manage credentials for third-party services and APIs. This facilitates secure API key rotation and management, ensuring that applications can access external services without hardcoding sensitive information.

How AWS Secrets Manager is priced

AWS Secrets Manager pricing includes charges for stored secrets, API calls, secret replicas when cross-region replication is enabled, and data transfer fees for outbound data.

Secrets Usage

AWS Secrets Manager charges based on the number of secrets stored and the number of API calls made per month. Storing a secret incurs a monthly fee, and additional charges apply for each 10,000 API calls made.

Replication Charges

When you enable replication to other AWS Regions, there is an additional charge for each replica of a secret. This fee is in addition to the standard secrets usage charge.

AWS Free Tier Credits

Starting July 15, 2025, new AWS customers can receive up to $200 in AWS Free Tier credits applicable to eligible services, including Secrets Manager. Customers can choose a free plan available for six months after account creation or a paid plan; remaining credits apply automatically after upgrading to a paid plan, and all credits must be used within 12 months of account creation.

Services AWS Secrets Manager works with

Amazon EC2Amazon EC2

Allows EC2 instances to retrieve secrets needed for applications and services running on them.

AWS LambdaAWS Lambda

Fetches secrets needed by Lambda functions to interact with other AWS services securely.

Amazon AppFlowAmazon AppFlow

Secrets Manager stores the credentials and OAuth tokens that AppFlow uses to connect to supported source and destination applications. AppFlow creates and manages these secrets for its connections.

Amazon AthenaAmazon Athena

Secrets Manager supplies credentials to supported Athena data source connectors. For example, a federated query connector can retrieve database credentials from a secret instead of including them in its configuration.

Amazon AuroraAmazon Aurora

Secrets Manager can manage and rotate an Aurora cluster's master password. Aurora Data API requests can also reference a secret containing database credentials.

Amazon Aurora ServerlessAmazon Aurora Serverless

Secrets Manager stores database credentials used by the Aurora Data API with supported Aurora Serverless configurations. It can also manage the master password for supported Aurora Serverless clusters.

What is AWS Secrets Manager

2 min read

AWS Secrets Manager is a fully managed service provided by Amazon Web Services (AWS) that enables customers to secure, store, and seamlessly rotate secrets, such as database credentials, API keys, and access tokens, throughout their lifecycle. This service is designed to help organizations protect access to their applications, services, and IT resources without the overhead of managing complex infrastructure for secret storage. In the realm of information technology, where security is paramount, AWS Secrets Manager offers a robust solution to safeguard sensitive information. By encrypting secrets at rest, it ensures that the stored data remains secure from unauthorized access.

 The service leverages AWS's industry-standard encryption protocols, providing peace of mind for businesses that their critical information is protected using state-of-the-art mechanisms. One of the key features of AWS Secrets Manager is its ability to automatically rotate secrets according to a schedule that users define. This capability is crucial for maintaining a high level of security, as it minimizes the risk associated with static credentials that, if compromised, could provide undetected access to malicious actors over extended periods. Automatic rotation ensures that credentials are always current and that their lifespan is limited, significantly reducing the threat of unauthorized access. 

AWS Secrets Manager integrates seamlessly with other AWS services, enabling easy retrieval of secrets by AWS resources such as Amazon RDS, Amazon Redshift, Amazon DocumentDB, and many others, without hardcoding sensitive information. This integration not only simplifies the management of secrets but also enhances security by keeping the plaintext of credentials out of the code, thereby reducing the likelihood of accidental exposure. 

Secrets can also be replicated to support disaster recovery scenarios.

GetSecretValue has a non-adjustable quota of 10,000 requests per second in each supported Region.

PutSecretValue, RemoveRegionsFromReplication, ReplicateSecretToRegion, StopReplicationToReplica, UpdateSecret, and UpdateSecretVersionStage share a non-adjustable combined quota of 50 requests per second in each supported Region.

Moreover, AWS Secrets Manager provides a detailed audit and monitoring capabilities. With its integration with AWS CloudTrail, users can track the secret request history to audit access and meet compliance requirements. This level of visibility is indispensable, allowing organizations to monitor for any unusual access patterns or unauthorized access attempts, thus immediately flagging potential security issues. 

In summary, AWS Secrets Manager presents a comprehensive and secure approach to managing secrets, enabling organizations to automate the rotation of credentials, achieve compliance with their security policies, and integrate with the broader AWS ecosystem. Its focus on automating security tasks and its compatibility with various AWS services make it an essential tool for any organization looking to enhance its security posture and streamline its operations in the cloud.

Concepts related to AWS Secrets Manager

AWS Secrets Manager exam questions

Real practice exam questions on AWS Secrets Manager, with the correct answer and its explanation. Answer them with every option in the exam simulator.

CLF-C02

An application retrieves a third-party payment API token from AWS Secrets Manager. During a security review, a team replaces the stored token with a randomly generated string. The application successfully retrieves the new value, but the payment provider rejects its requests. The original token still works with the provider. What should the team do to complete the credential replacement?

Show answerCORRECT ANSWER

Obtain a replacement token from the payment provider, store it in Secrets Manager, verify that the application uses it successfully, and revoke the original token with the provider.

Complete rotation requires a replacement credential that the authenticating system accepts, delivery to the application, verification, and invalidation of the old credential. Updating secret storage alone does not accomplish this.

SOA-C03

A company runs an application on Amazon EC2 instances in private subnets. The application retrieves an API token stored in AWS Secrets Manager by using the SDK's standard Regional service hostname. The instances have no internet access, NAT gateway, or existing VPC endpoints. Requests to retrieve the token time out, although the instance role has the required permissions to retrieve and decrypt the secret.

A security policy prohibits adding internet access. The application must continue using the standard Regional service hostname without code or endpoint configuration changes. VPC DNS resolution and DNS hostnames are enabled.

Which solution should a CloudOps engineer implement?

Show answerCORRECT ANSWER

Create an interface VPC endpoint for AWS Secrets Manager with private DNS enabled. Allow inbound TCP port 443 on the endpoint's security group from the application instances, and configure the endpoint policy to permit retrieval of the secret.

An interface endpoint provides private connectivity to Secrets Manager without internet access. Private DNS makes the standard Regional service hostname resolve to the endpoint's private IP addresses, so the SDK needs no endpoint configuration changes. The security group and endpoint policy must also permit the requests.

SAP-C03

A company uses AWS CloudFormation to manage a central security account and several application accounts. An existing AWS Secrets Manager secret in the security account contains a vendor credential and uses the AWS managed KMS key aws/secretsmanager. Applications must retrieve the current credential directly from this central secret at runtime. Company policy prohibits copying the credential into application accounts.

The secret's resource policy allows a specific application role in another account to call secretsmanager:GetSecretValue. That role's identity policy allows the same action on the secret's full ARN. Runtime retrieval still fails because decryption is not authorized. There are no explicit denies or other relevant permissions. The security team can update both accounts' CloudFormation templates.

Which infrastructure code changes will enable the application role to retrieve the secret while limiting decryption authorization to that role and the key required for this secret?

Show answerCORRECT ANSWER

Create a customer managed symmetric KMS key in the security account and update the secret's KmsKeyId to use it. Authorize the application role to perform kms:Decrypt in the key policy, and add kms:Decrypt on that key's ARN to the application role's identity policy. Retain the existing secret-access policies.

Cross-account secret retrieval requires a customer managed KMS key. Cross-account KMS authorization requires permission in the key-owning account's key policy and in the caller's identity policy. These changes provide both permissions for the specific application role and key, while the existing Secrets Manager policies authorize retrieval of the central secret.

Practice AWS Secrets Manager in a full exam

Questions on AWS Secrets Manager in each practice exam, with every answer option and an explanation for each:

Start a free practice exam

Learn AWS Secrets Manager in lessons

16 short lessons on AWS Secrets Manager in 7 certification courses.

and 10 more lessons

Open the lessons

AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.