> ## Documentation Index
> Fetch the complete documentation index at: https://zenml.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# AWS Secrets Manager

> How to store secrets in AWS

The AWS secrets manager is a [secrets manager](/component-gallery/secrets-managers) flavor provided with the ZenML `aws` integration that uses [AWS](https://aws.amazon.com/secrets-manager/) to store secrets.

### When to use it

You should use the AWS secrets manager if:

* a component of your stack requires a secret for authentication, or you want to use secrets inside your steps.

* you're already using AWS, especially if your orchestrator is running in AWS. If you're using a different cloud provider, take a look at the other [secrets manager flavors](/component-gallery/secrets-managers#secrets-manager-flavors).

### How to deploy it

The AWS secrets manager is automatically activated once you create an AWS account.

### How to use it

To use the AWS secrets manager, we need:

* The ZenML `aws` integration installed. If you haven't done so, run

```
zenml integration install aws  
```

* The [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) installed and authenticated.

* A region in which you want to store your secrets. Choose one from the list [here](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints).

We can then register the secrets manager and use it in our active stack:

```
zenml secrets-manager register  \
    --flavor=aws \
    --region_name=

# Add the secrets manager to the active stack
zenml stack update -x 
```

You can now [register, update or delete secrets](/component-gallery/secrets-managers#in-the-cli) using the CLI or [fetch secret values inside your steps](/component-gallery/secrets-managers#in-a-zenml-step).

You can use [secret scoping](/component-gallery/secrets-managers#secret-scopes) with the AWS Secrets Manager to emulate multiple Secrets Manager namespaces on top of a single AWS region.

A concrete example of using the AWS secrets manager can be found [here](https://github.com/zenml-io/zenml/tree/main/examples/cloud%5Fsecrets%5Fmanager).

For more information and a full list of configurable attributes of the AWS secrets manager, check out the [API Docs](https://apidocs.zenml.io/latest/integration%5Fcode%5Fdocs/integrations-aws/#zenml.integrations.aws.secrets%5Fmanagers.aws%5Fsecrets%5Fmanager.AWSSecretsManager).
