# AWS Secrets Manager

Cloud service · AWS. Updated 2026-11-12. Page: https://blowstack.com/tools/cloud-services-hub/aws-secrets-manager

> 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.

Practice exams covering AWS Secrets Manager: [CLF-C02 AWS Certified Cloud Practitioner](https://blowstack.com/practice-exams/aws-certified-cloud-practitioner), [SOA-C03 AWS Certified CloudOps Engineer - Associate](https://blowstack.com/practice-exams/aws-certified-cloudops-engineer-associate), [DEA-C01 AWS Certified Data Engineer - Associate](https://blowstack.com/practice-exams/aws-certified-data-engineer-associate), [DVA-C02 AWS Certified Developer - Associate](https://blowstack.com/practice-exams/aws-certified-developer-associate), [DOP-C02 AWS Certified DevOps Engineer - Professional](https://blowstack.com/practice-exams/aws-certified-devops-engineer-professional), [SCS-C03 AWS Certified Security - Specialty](https://blowstack.com/practice-exams/aws-certified-security-specialty), [SAA-C03 AWS Certified Solutions Architect - Associate](https://blowstack.com/practice-exams/aws-certified-solutions-architect-associate), [SAP-C03 AWS Certified Solutions Architect - Professional](https://blowstack.com/practice-exams/aws-certified-solutions-architect-professional).

## 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.

1. **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.
2. **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.
3. **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.
4. **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.
5. **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.
6. **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.
7. **Third-Party Integrations**: Supports integration with third-party applications and services, extending secret management capabilities beyond AWS resources and into your broader IT ecosystem.
8. **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. **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. **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. **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. **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. **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

- **[AWS Identity and Access Management (IAM)](https://blowstack.com/tools/cloud-services-hub/aws-identity-and-access-management-(iam))**: Enables fine-grained access control to manage and control access to secrets.
- **[Amazon RDS](https://blowstack.com/tools/cloud-services-hub/amazon-rds)**: Automatically updates database credentials for RDS instances.
- **[Amazon Redshift](https://blowstack.com/tools/cloud-services-hub/amazon-redshift)**: Manages and rotates database credentials for Amazon Redshift clusters.
- **[Amazon EC2](https://blowstack.com/tools/cloud-services-hub/amazon-ec2)**: Allows EC2 instances to retrieve secrets needed for applications and services running on them.
- **[AWS Lambda](https://blowstack.com/tools/cloud-services-hub/aws-lambda)**: Fetches secrets needed by Lambda functions to interact with other AWS services securely.
- **[AWS CloudFormation](https://blowstack.com/tools/cloud-services-hub/aws-cloudformation)**: Enables the retrieval and use of secrets securely during the deployment of CloudFormation stacks.
- **[Amazon AppFlow](https://blowstack.com/tools/cloud-services-hub/amazon-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 Athena](https://blowstack.com/tools/cloud-services-hub/amazon-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 Aurora](https://blowstack.com/tools/cloud-services-hub/amazon-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 Serverless](https://blowstack.com/tools/cloud-services-hub/amazon-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.
- **[Amazon Bedrock](https://blowstack.com/tools/cloud-services-hub/amazon-bedrock)**: Secrets Manager stores credentials that Bedrock Knowledge Bases uses to access supported databases and vector stores. For example, a Pinecone-backed knowledge base references a secret containing its API key.
- **[Amazon Bedrock AgentCore](https://blowstack.com/tools/cloud-services-hub/amazon-bedrock-agentcore)**: Secrets Manager provides secure storage for API keys configured through AgentCore Identity credential providers. Agents can use these providers to authenticate to external tools without embedding keys in their code.
- **[Amazon CloudWatch](https://blowstack.com/tools/cloud-services-hub/amazon-cloudwatch)**: Secrets Manager publishes CloudWatch metrics for monitoring secret inventory and API activity. CloudWatch alarms can notify operators when selected metrics cross configured thresholds.
- **[Amazon Connect](https://blowstack.com/tools/cloud-services-hub/amazon-connect)**: Secrets Manager stores client credentials used by supported third-party application integrations in Amazon Connect. Connect can retrieve these credentials to authenticate requests to the integrated application.
- **[Amazon Data Firehose](https://blowstack.com/tools/cloud-services-hub/amazon-kinesis-data-firehose)**: Secrets Manager stores credentials that Firehose uses to authenticate to supported delivery destinations. A delivery stream can reference a secret rather than keeping destination credentials directly in its configuration.
- **[Amazon DataZone](https://blowstack.com/tools/cloud-services-hub/amazon-datazone)**: Secrets Manager supplies authentication credentials for supported DataZone data connections. Connection configurations can reference a secret containing the credentials needed to access a data source.
- **[Amazon DocumentDB (with MongoDB compatibility)](https://blowstack.com/tools/cloud-services-hub/amazon-documentdb-(with-mongodb-compatibility))**: Secrets Manager stores DocumentDB database credentials and supports automatic rotation using a Lambda rotation function. Applications can retrieve the current secret after rotation instead of receiving a new password through deployment configuration.
- **[Amazon ECS Anywhere](https://blowstack.com/tools/cloud-services-hub/amazon-ecs-anywhere)**: Secrets Manager can supply sensitive values to ECS tasks running on ECS Anywhere external instances. Supported task definitions reference secrets for injection into container environment variables or other supported task settings.
- **[Amazon Elastic Container Registry (Amazon ECR)](https://blowstack.com/tools/cloud-services-hub/amazon-elastic-container-registry-(amazon-ecr))**: Secrets Manager stores upstream registry credentials for ECR pull-through cache rules that require authentication. ECR retrieves the referenced secret when importing images from the upstream registry.
- **[Amazon Elastic Container Service (Amazon ECS)](https://blowstack.com/tools/cloud-services-hub/amazon-elastic-container-service-(amazon-ecs))**: Secrets Manager supplies secrets to ECS containers through task-definition references, including environment variables, log configuration, and private registry authentication. ECS Service Connect also uses managed secrets for its TLS certificate infrastructure.
- **[Amazon Elastic Kubernetes Service (Amazon EKS)](https://blowstack.com/tools/cloud-services-hub/amazon-elastic-kubernetes-service-(amazon-eks))**: Secrets Manager secrets can be mounted into EKS pods through the AWS Secrets and Configuration Provider for the Secrets Store CSI Driver. Pod permissions control which secrets can be retrieved, and the driver supports refreshing mounted values when rotation is configured.
- **[Amazon ElastiCache](https://blowstack.com/tools/cloud-services-hub/amazon-elasticache)**: Secrets Manager can store ElastiCache user credentials and rotate supported passwords through a Lambda rotation function. This keeps the stored secret and the corresponding ElastiCache user password synchronized.
- **[Amazon EMR](https://blowstack.com/tools/cloud-services-hub/amazon-emr)**: Secrets Manager supplies credentials to supported EMR integrations, including EMR Serverless connections to external Hive metastores. The connection configuration references a secret instead of containing the metastore database password.
- **[Amazon EventBridge](https://blowstack.com/tools/cloud-services-hub/amazon-eventbridge)**: Secrets Manager stores authorization credentials for EventBridge connections used by API destinations and other supported HTTP integrations. Secrets Manager API and lifecycle events can also be routed through EventBridge for notification or remediation.
- **[Amazon FSx](https://blowstack.com/tools/cloud-services-hub/amazon-fsx-(for-all-types))**: Secrets Manager can hold the Active Directory service-account credentials used by supported FSx file systems. FSx retrieves the referenced credentials for domain-join operations rather than requiring a password directly in the file-system configuration.
- **[Amazon GuardDuty](https://blowstack.com/tools/cloud-services-hub/amazon-guardduty)**: GuardDuty analyzes Secrets Manager API activity recorded in CloudTrail to detect suspicious access to secrets. Findings can identify activity such as anomalous secret retrieval or access associated with compromised credentials.
- **[Amazon Kendra](https://blowstack.com/tools/cloud-services-hub/amazon-kendra)**: Secrets Manager stores authentication credentials for Kendra data source connectors. A connector references the secret when crawling a repository, such as a SharePoint site or a database.
- **[Amazon Kinesis Video Streams](https://blowstack.com/tools/cloud-services-hub/amazon-kinesis-video-streams)**: Secrets Manager stores camera connection credentials used by the Kinesis Video Streams Edge Agent. Edge configurations reference secrets containing RTSP connection information so credentials do not have to be embedded in deployment files.
- **[Amazon Managed Grafana](https://blowstack.com/tools/cloud-services-hub/amazon-managed-grafana)**: Secrets Manager can supply database credentials for supported Managed Grafana data sources, including Amazon Redshift. The data source retrieves credentials from the referenced secret using the workspace's authorized role.
- **[Amazon Managed Streaming for Apache Kafka](https://blowstack.com/tools/cloud-services-hub/amazon-managed-streaming-for-apache-kafka)**: Secrets Manager stores SASL/SCRAM usernames and passwords for MSK clusters. Associating appropriately configured secrets with a cluster makes those credentials available for Kafka client authentication.
- **[Amazon Managed Workflows for Apache Airflow (Amazon MWAA)](https://blowstack.com/tools/cloud-services-hub/amazon-managed-workflows-for-apache-airflow-(amazon-mwaa))**: Secrets Manager can act as an Airflow secrets backend for MWAA connections and variables. DAGs can refer to connection identifiers while the corresponding passwords and other sensitive values remain in Secrets Manager.
- **[Amazon OpenSearch Service](https://blowstack.com/tools/cloud-services-hub/amazon-opensearch-service)**: Secrets Manager supplies credentials to supported OpenSearch Ingestion sources and sinks. Pipeline configurations reference secrets for values such as database passwords rather than embedding those values in pipeline definitions.
- **[Amazon Q](https://blowstack.com/tools/cloud-services-hub/amazon-q)**: Secrets Manager stores authentication details used by supported Amazon Q data source integrations. Connectors retrieve the referenced credentials when accessing external repositories.
- **[Amazon Q Business](https://blowstack.com/tools/cloud-services-hub/amazon-q-business)**: Secrets Manager stores credentials for Q Business data source connectors. For example, a connector can use a secret containing the authentication details needed to synchronize content from an external business system.
- **[Amazon QuickSight](https://blowstack.com/tools/cloud-services-hub/amazon-quicksight)**: Secrets Manager supplies credentials for supported QuickSight database data sources. QuickSight can retrieve a database username and password from a referenced secret rather than storing explicitly supplied credentials in the data source definition.
- **[Amazon RDS Proxy](https://blowstack.com/tools/cloud-services-hub/amazon-rds-proxy)**: Secrets Manager stores database credentials that RDS Proxy uses in secret-backed authentication configurations. The proxy retrieves authorized secrets to establish database connections, while credential rotation can update the database password and stored secret.
- **[Amazon SageMaker](https://blowstack.com/tools/cloud-services-hub/amazon-sagemaker)**: Secrets Manager stores credentials for supported SageMaker features, including private Git repositories and private Docker registries. SageMaker retrieves the referenced secret when accessing those resources.
- **[Amazon SageMaker Data Wrangler](https://blowstack.com/tools/cloud-services-hub/amazon-sagemaker-data-wrangler)**: Secrets Manager stores credentials for supported Data Wrangler data connections, including Snowflake connections. Data Wrangler can retrieve those credentials when importing data without requiring passwords in the data flow.
- **[Amazon Timestream for InfluxDB](https://blowstack.com/tools/cloud-services-hub/amazon-timestream-for-influxdb)**: Secrets Manager stores the initial administrative credentials created for a Timestream for InfluxDB instance. The instance exposes the secret's ARN so authorized users can retrieve the credentials; changing the secret alone does not change the database credentials.
- **[Amazon VPC](https://blowstack.com/tools/cloud-services-hub/amazon-vpc)**: Secrets Manager supports interface VPC endpoints so workloads can access its API privately from a VPC. Endpoint policies can further restrict which Secrets Manager operations and resources are accessible through the endpoint.
- **[Amazon WorkSpaces](https://blowstack.com/tools/cloud-services-hub/amazon-workspaces)**: Secrets Manager stores Active Directory service-account credentials used by WorkSpaces Pools directory configurations. WorkSpaces Pools retrieves the referenced secret to join pooled desktops to the domain.
- **[AWS App Runner](https://blowstack.com/tools/cloud-services-hub/aws-app-runner)**: Secrets Manager supplies sensitive environment-variable values to App Runner services through secret ARN references. App Runner retrieves the values during deployment using an authorized instance role.
- **[AWS AppConfig](https://blowstack.com/tools/cloud-services-hub/aws-appconfig)**: Secrets Manager can serve as a configuration source for AppConfig. An AppConfig configuration profile can reference a secret, allowing its contents to be deployed through AppConfig's validation and controlled rollout process.
- **[AWS AppSync](https://blowstack.com/tools/cloud-services-hub/aws-appsync)**: Secrets Manager stores database credentials for AppSync relational database data sources that use the RDS Data API. The data source references the secret ARN when executing database operations.
- **[AWS Audit Manager](https://blowstack.com/tools/cloud-services-hub/aws-audit-manager)**: Audit Manager can collect AWS Config compliance evidence for controls covering Secrets Manager resources. This supports audits of requirements such as automatic secret rotation without manually collecting each evaluation result.
- **[AWS Batch](https://blowstack.com/tools/cloud-services-hub/aws-batch)**: Secrets Manager supplies sensitive values to supported Batch jobs through job-definition secret references. Batch can inject a secret into a container environment variable without placing its plaintext value in the job definition.
- **[AWS CloudTrail](https://blowstack.com/tools/cloud-services-hub/aws-cloudtrail)**: Secrets Manager records API operations and selected lifecycle events in CloudTrail. These records support auditing who retrieved, modified, rotated, or scheduled deletion of a secret without recording its secret value.
- **[AWS CodeBuild](https://blowstack.com/tools/cloud-services-hub/aws-codebuild)**: Secrets Manager supplies build credentials through CodeBuild environment-variable and buildspec references. A build can retrieve a whole secret or a specific JSON field, such as a package repository password.
- **[AWS Config](https://blowstack.com/tools/cloud-services-hub/aws-config)**: AWS Config records configuration changes to Secrets Manager secrets and evaluates them with supported managed rules. Rules can check conditions such as whether rotation is enabled, whether rotation succeeded, and whether secrets use an approved KMS key.
- **[AWS Database Migration Service (AWS DMS)](https://blowstack.com/tools/cloud-services-hub/aws-database-migration-service-(aws-dms))**: Secrets Manager stores database endpoint credentials for DMS migration tasks. A DMS endpoint can reference a secret and an access role instead of containing a plaintext username and password.
- **[AWS DataSync](https://blowstack.com/tools/cloud-services-hub/aws-datasync)**: Secrets Manager stores credentials for supported DataSync locations, including locations that require external storage authentication. DataSync can create managed secrets or use customer-provided secrets for supported location configurations.
- **[AWS Direct Connect](https://blowstack.com/tools/cloud-services-hub/aws-direct-connect)**: Secrets Manager stores MACsec Connectivity Association Key material for Direct Connect connections. Direct Connect uses the associated secret to configure encryption on supported dedicated connections.
- **[AWS Directory Service](https://blowstack.com/tools/cloud-services-hub/aws-directory-service)**: Secrets Manager supports automatic rotation of Active Directory account passwords through a dedicated Lambda rotation template. This integration can maintain credentials for accounts in AWS Managed Microsoft AD.
- **[AWS Elastic Beanstalk](https://blowstack.com/tools/cloud-services-hub/aws-elastic-beanstalk)**: Secrets Manager can supply sensitive environment-property values to Elastic Beanstalk environments on supported platform versions. Environment settings reference secret ARNs so passwords and API keys do not need to be stored as plaintext configuration values.
- **[AWS Fargate](https://blowstack.com/tools/cloud-services-hub/aws-fargate)**: Secrets Manager supplies secrets to ECS tasks running on Fargate through supported task-definition fields. Tasks can receive secret values as environment variables or use them for private registry authentication and supported log configurations.
- **[AWS Glue](https://blowstack.com/tools/cloud-services-hub/aws-glue)**: Secrets Manager stores credentials used by Glue connections, crawlers, and supported Glue Studio connectors. A connection can reference a database secret so jobs retrieve credentials without including them in scripts.
- **[AWS Glue DataBrew](https://blowstack.com/tools/cloud-services-hub/aws-glue-databrew)**: Secrets Manager stores authentication credentials for DataBrew connections to supported data sources. DataBrew retrieves the connection secret when accessing data for profiling or transformation.
- **[AWS IoT Greengrass](https://blowstack.com/tools/cloud-services-hub/aws-iot-greengrass)**: The Greengrass secret manager component retrieves Secrets Manager secrets and makes them available to authorized local components. It caches secrets on the core device so components can use them during intermittent connectivity.
- **[AWS IoT SiteWise](https://blowstack.com/tools/cloud-services-hub/aws-iot-sitewise)**: Secrets Manager stores authentication details for supported SiteWise gateway data sources, including OPC UA servers. Gateway components retrieve the referenced secrets when establishing authenticated connections.
- **[AWS Key Management Service (AWS KMS)](https://blowstack.com/tools/cloud-services-hub/aws-key-management-service-(aws-kms))**: Secrets Manager uses KMS keys to encrypt secret values with envelope encryption. You can select a customer managed key to control key permissions and audit cryptographic operations separately from secret access.
- **[AWS Launch Wizard](https://blowstack.com/tools/cloud-services-hub/aws-launch-wizard)**: Secrets Manager stores credentials used by supported Launch Wizard application deployments. Deployment workflows can reference secrets for administrative or database credentials instead of embedding passwords in deployment inputs.
- **[AWS Managed Services (AMS)](https://blowstack.com/tools/cloud-services-hub/aws-managed-services-(ams))**: AMS uses Secrets Manager in supported operational workflows to protect credentials for managed resources. Authorized operators and automation can retrieve the credentials through controlled, auditable access.
- **[AWS Marketplace](https://blowstack.com/tools/cloud-services-hub/aws-marketplace)**: Secrets Manager stores deployment credentials for supported Marketplace products through Marketplace deployment-managed secrets. These secrets let product deployment workflows handle sensitive configuration without exposing it as ordinary deployment parameters.
- **[AWS Migration Hub](https://blowstack.com/tools/cloud-services-hub/aws-migration-hub)**: Secrets Manager supplies credentials to supported Migration Hub Orchestrator workflows. For example, an application migration workflow can retrieve credentials needed to access source systems during automated migration steps.
- **[AWS PrivateLink](https://blowstack.com/tools/cloud-services-hub/aws-privatelink)**: Secrets Manager supports PrivateLink through interface VPC endpoints. Applications can call Secrets Manager over private connectivity without requiring an internet gateway or NAT gateway.
- **[AWS Resource Groups and Tag Editor](https://blowstack.com/tools/cloud-services-hub/aws-resource-groups-and-tag-editor)**: Secrets Manager secrets support resource grouping and tag management through Resource Groups and Tag Editor. You can organize secrets by application or environment and update their tags alongside other supported AWS resources.
- **[AWS Security Hub](https://blowstack.com/tools/cloud-services-hub/aws-security-hub)**: Security Hub evaluates Secrets Manager security controls, including rotation configuration, successful rotation, unused secrets, and customer managed key encryption. Failed checks generate findings that can be prioritized and routed for remediation.
- **[AWS Step Functions](https://blowstack.com/tools/cloud-services-hub/aws-step-functions)**: Step Functions can invoke Secrets Manager operations through its AWS SDK service integration. A workflow can retrieve, create, or update a secret as a task, with execution-history and logging settings configured to avoid exposing sensitive results.
- **[AWS Systems Manager](https://blowstack.com/tools/cloud-services-hub/aws-systems-manager)**: Systems Manager Parameter Store supports references to Secrets Manager secrets through the reserved /aws/reference/secretsmanager path. Tools and workflows that support these references can retrieve secret values through the Parameter Store interface.
- **[AWS Transfer Family](https://blowstack.com/tools/cloud-services-hub/aws-transfer-family)**: Secrets Manager stores credentials for supported Transfer Family connectors, including remote SFTP server authentication. Transfer Family also provides a custom identity-provider solution that uses Secrets Manager to hold user authentication and access settings.
- **[AWS Trusted Advisor](https://blowstack.com/tools/cloud-services-hub/aws-trusted-advisor)**: Trusted Advisor can surface supported Security Hub checks concerning Secrets Manager, such as rotation and secret usage checks. These recommendations help identify secrets that need security maintenance.
- **[EC2 Image Builder](https://blowstack.com/tools/cloud-services-hub/ec2-image-builder)**: Secrets Manager supplies sensitive values to Image Builder workflows through the GetSecretValue workflow action. A workflow can retrieve a credential for a build step without including its plaintext value in the workflow definition.

## What is AWS Secrets Manager

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

- [Credential Rotation](https://blowstack.com/tools/cloud-concepts-hub/credential-rotation): Credential rotation is the controlled replacement of authentication secrets, followed by retirement of the old credentials, to limit their useful lifetime.
- [Credential Management](https://blowstack.com/tools/cloud-concepts-hub/credential-management): Credential management is the controlled creation, storage, use, renewal, and revocation of the authentication material that people and workloads use to access systems.
- [Externalized Configuration](https://blowstack.com/tools/cloud-concepts-hub/externalized-configuration): Externalized Configuration separates environment-specific settings and operational controls from application code so the same application artifact can run in different environments.
- [Adapter Pattern](https://blowstack.com/tools/cloud-concepts-hub/adapter-pattern): The Adapter Pattern translates a provider-specific interface into a stable application interface so implementations can change without changing calling code.
- [Attribute-Based Access Control](https://blowstack.com/tools/cloud-concepts-hub/attribute-based-access-control): Attribute-Based Access Control is an authorization model that grants or denies access by evaluating attributes of the requester, resource, requested action, and request context.
- [Credential Revocation](https://blowstack.com/tools/cloud-concepts-hub/credential-revocation): Credential revocation is the deliberate invalidation of authentication material, or denial of its use, so it can no longer authorize access.
- [Environment Variables](https://blowstack.com/tools/cloud-concepts-hub/environment-variables): Environment variables are named string values made available to a running process to configure its behavior without changing its application code.
- [OAuth 2.0](https://blowstack.com/tools/cloud-concepts-hub/oauth-2_0): OAuth 2.0 is an authorization framework that lets applications obtain limited access to protected resources using access tokens rather than a resource owner's credentials.
- [Password Policies](https://blowstack.com/tools/cloud-concepts-hub/password-policies): Password policies are rules governing how passwords are created, used, changed, and protected within an identity system.
- [Strategy Pattern](https://blowstack.com/tools/cloud-concepts-hub/strategy-pattern): The Strategy Pattern encapsulates interchangeable behaviors behind a common interface so an application can select an implementation at runtime without changing its calling code.
- [Symmetric Encryption](https://blowstack.com/tools/cloud-concepts-hub/symmetric-encryption): Symmetric encryption protects data by using the same secret key to encrypt plaintext and decrypt ciphertext.
- [Temporary Credentials](https://blowstack.com/tools/cloud-concepts-hub/temporary-credentials): Temporary credentials are authentication credentials issued with a defined expiration time for limited-duration access to systems and resources.

## AWS Secrets Manager exam questions

Real practice exam questions on AWS Secrets Manager, with the correct answer and its explanation.

### Question 1 (CLF-C02)

**Question:**

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?

**Correct 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.

**Explanation:** 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.

### Question 2 (SOA-C03)

**Question:**

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?

**Correct 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.

**Explanation:** 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.

### Question 3 (SAP-C03)

**Question:**

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?

**Correct 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.

**Explanation:** 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.

### Question 4 (DEA-C01)

**Question:**

An AWS Glue job retrieves a database password from AWS Secrets Manager in us-east-1. The secret is encrypted with a dedicated customer managed AWS KMS key. The job's execution role already allows secretsmanager:GetSecretValue on the secret, but it has no KMS permissions. The key policy enables the account to delegate permissions through IAM policies.

Security requires the role to decrypt the password through Secrets Manager, but prohibits the role from calling KMS directly to decrypt ciphertext, even if the role obtains the ciphertext and its encryption context. No other policies grant or restrict the role's KMS access.

Which permission should a data engineer add to the execution role to meet these requirements?

**Correct answer:** Allow kms:Decrypt on the key ARN with a StringEquals condition requiring kms:ViaService to equal secretsmanager.us-east-1.amazonaws.com.

**Explanation:** Secrets Manager calls KMS on behalf of the execution role when retrieving the encrypted secret. The kms:ViaService condition permits this service-mediated decryption while excluding direct KMS calls from the role.

### Question 5 (SCS-C03)

**Question:**

A company runs a payment-processing service on Amazon ECS with AWS Fargate. Each task receives a payment provider's API token through an environment variable populated from AWS Secrets Manager when the task starts. The task definition references the secret without specifying a version ID or staging label. Running tasks do not retrieve the secret again.

The payment provider permits two tokens to remain valid simultaneously and supports explicit token revocation. An automated rotation workflow creates a replacement token, stores and tests it, and moves AWSCURRENT to the replacement secret version. The previous token remains valid at the provider. No token is compromised.

The company requires rotation without authentication failures and revocation of the previous token within 1 hour after promotion. An ECS rolling deployment can replace and drain all existing tasks within 20 minutes while maintaining sufficient healthy capacity.

Which action should the security engineer add after the workflow promotes the replacement secret version?

**Correct answer:** Force a new ECS service deployment. Wait until all previous tasks have drained and stopped, and verify that replacement tasks successfully authenticate with the new token. Then revoke the previous token at the payment provider.

**Explanation:** ECS injects the secret value when a task starts; changing AWSCURRENT does not update running tasks' environment variables. A forced deployment starts replacement tasks with the new token. Keeping both tokens valid until the previous tasks have drained avoids authentication failures. Verifying replacement-task authentication before revoking the previous token completes rotation within the stated time limit.

### Question 6 (DOP-C02)

**Question:**

A company uses AWS Secrets Manager and a custom AWS Lambda rotation function to manage a third-party API credential. The API provider supports multiple simultaneously valid tokens and requires an explicit API call to revoke each token by its immutable token ID. Changing a secret in Secrets Manager does not revoke tokens at the provider.

Every 24 hours, the rotation function creates a token, tests it, and promotes its secret version to AWSCURRENT. Application instances retrieve AWSCURRENT and cache the credential for at most 36 hours. The API provider does not support automatic token expiration. Rotation currently succeeds, but a security review discovers that all previously issued tokens remain valid.

The company requires each replaced token to remain valid for 36 hours after its replacement is promoted and to be revoked within the following hour. Scheduled rotations must continue every 24 hours without application changes.

Which change should a DevOps engineer implement?

**Correct answer:** During each rotation, durably record the immutable token ID from the outgoing AWSCURRENT version and the replacement's promotion time. Schedule a retryable cleanup invocation for 36 hours after that promotion to revoke the recorded token ID at the provider, treating an already-revoked token as success.

**Explanation:** The recorded token ID identifies the exact credential being retired even after additional rotations move the staging labels. Revoking that token at the provider after its 36-hour grace period completes rotation without disrupting cached credentials. Durable scheduling and idempotent retries support reliable retirement within the required window.

### Question 7 (SAA-C03)

**Question:**

A company provisions Amazon RDS for PostgreSQL DB instances through an automated deployment pipeline. Administrators currently generate master user passwords and supply them as deployment parameters.

The company requires AWS to generate, securely store, and automatically rotate each database's master user password. The pipeline must not handle plaintext passwords. The company also wants to avoid maintaining password-generation scripts or Lambda rotation functions.

Which solution meets these requirements with the LEAST operational overhead?

**Correct answer:** Configure each DB instance to have Amazon RDS manage its master user password in AWS Secrets Manager. Do not supply a master password in the deployment parameters.

**Explanation:** RDS integrates with Secrets Manager to generate, store, and automatically rotate the master user password. RDS coordinates password changes with the database, so the pipeline does not need the plaintext password and the company does not need to maintain a Lambda rotation function.

## 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:

- [DEA-C01](https://blowstack.com/practice-exams/aws-certified-data-engineer-associate): 17 questions
- [DOP-C02](https://blowstack.com/practice-exams/aws-certified-devops-engineer-professional): 14 questions
- [SOA-C03](https://blowstack.com/practice-exams/aws-certified-cloudops-engineer-associate): 9 questions
- [SCS-C03](https://blowstack.com/practice-exams/aws-certified-security-specialty): 9 questions
- [SAP-C03](https://blowstack.com/practice-exams/aws-certified-solutions-architect-professional): 6 questions
- [SAA-C03](https://blowstack.com/practice-exams/aws-certified-solutions-architect-associate): 6 questions
- [CLF-C02](https://blowstack.com/practice-exams/aws-certified-cloud-practitioner): 4 questions
- [DVA-C02](https://blowstack.com/practice-exams/aws-certified-developer-associate): 2 questions

## Learn AWS Secrets Manager in lessons

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

- CLF-C02: AWS Secrets Manager and AWS Systems Manager: choosing a credential store (Premium), https://app.blowstack.com/lessons/aws-secrets-manager-and-aws-systems-manager-choosing-a-credential-store-clf-c02
- SOA-C03: AWS Secrets Manager: secure secret storage and access (Premium), https://app.blowstack.com/lessons/aws-secrets-manager-secure-secret-storage-and-access-soa-c03
- SAP-C03: AWS Secrets Manager: secret references in infrastructure code (Premium), https://app.blowstack.com/lessons/aws-secrets-manager-secret-references-in-infrastructure-code-sap-c03
- DEA-C01: AWS Secrets Manager: protected secret storage (Premium), https://app.blowstack.com/lessons/aws-secrets-manager-protected-secret-storage-dea-c01
- SCS-C03: AWS Secrets Manager: safe credential rotation (Premium), https://app.blowstack.com/lessons/aws-secrets-manager-safe-credential-rotation-scs-c03
- DOP-C02: AWS Secrets Manager: automated credential rotation (Premium), https://app.blowstack.com/lessons/aws-secrets-manager-automated-credential-rotation-dop-c02
