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

# AWS CLI

> Hoop could be configured to use the AWS command line to manage resources in multiple accounts.

## Prerequisites

To get the most out of this guide, you will need to:

* Either [create an account in our managed instance](https://use.hoop.dev) or [deploy your own hoop.dev instance](/getting-started/installation/overview)
* You must be your account administrator to perform the following commands

## Connection Configuration

| Name                     | Type    | Description               |
| ------------------------ | ------- | ------------------------- |
| AWS\_ACCESS\_KEY\_ID     | env-var | The access key credential |
| AWS\_SECRET\_ACCESS\_KEY | env-var | The secret key credential |
| AWS\_REGION              | env-var | The AWS region            |

<Info>
  Use an IAM credential with reduced scope to only create secrets and/or listing ECS services
</Info>

### Connection Command

* secretsmanager

```bash
hoop admin create conn secretsmanager -a <agent> \
	-e AWS_ACCESS_KEY_ID=<key-id> \
	-e AWS_SECRET_ACCESS_KEY=<key> \
	-e AWS_REGION=us-east-1 \
	-- aws secretsmanager create-secret
```

* list-services-prod

```bash
hoop admin create conn list-services-prod -a <agent> \
	-e AWS_ACCESS_KEY_ID=<key-id> \
	-e AWS_SECRET_ACCESS_KEY=<key> \
	-e AWS_REGION=us-east-1 \
	-- aws ecs list-services --cluster prod
```

## How to Use

Now, it’s possible to create credentials on the AWS Secrets Manager service.

```bash
hoop exec secretsmanager -- \
    --name MyTestSecret
    --description "My test secret created with the CLI." \
    --secret-string "{\"user\":\"diegor\",\"password\":\"EXAMPLE-PASSWORD\"}"
```

Or listing ECS Services from cluster `prod`

```bash
hoop exec list-services-prod
```
