> For the complete documentation index, see [llms.txt](https://notes.programmersecurity.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://notes.programmersecurity.com/cloud-pentesting/enumeration.md).

# Enumeration

## AWSCLI Configuration

We can configure Profile using awscli

```python
aws configure --profile McDuck
```

<figure><img src="/files/20MkjMMQpX1uNZn4WFiV" alt=""><figcaption></figcaption></figure>

## Getting Basic Information

First Thing you need to do after setting the credentials is that you need to see your details and information

```python
aws sts get-caller-identity --profile user1
aws iam get-user
```

<figure><img src="/files/sHeaRB7EwESBS4qf4yzT" alt=""><figcaption></figcaption></figure>

### List Groups&#x20;

```bash
aws --profile user4 iam list-groups-for-user --user-name r_waterhouse
```

<figure><img src="/files/BSAT6VyIMPm3P6tuysvV" alt=""><figcaption></figcaption></figure>

### List Policies

```
aws --profile user4 iam list-group-policies --group-name cg-developers
```

<figure><img src="/files/yiuvdp7Hqjul5b6YU0da" alt=""><figcaption></figcaption></figure>

### List Group Policy

```python
aws --profile user4 iam get-group-policy --group-name cg-developers --policy-name developer_policy
```

<figure><img src="/files/YFqhUSkj9fw9ZO7xYMTS" alt=""><figcaption></figcaption></figure>

## S3 Buckets

### List s3 Buckets

```python
aws s3 ls --profile McDuck
```

<figure><img src="/files/MV6szRy6jbcARqjHx84v" alt=""><figcaption></figcaption></figure>

### Recursively Look at the S3 Buckets

We can recursively see the S3 Buckets

```python
aws s3 ls s3://cg-keystore-s3-bucket-rce-webapp --recursive --profile McDuck
```

<figure><img src="/files/zh7IUgduy0AK3kDEeDGR" alt=""><figcaption></figcaption></figure>

### Download Files From S3 Buckets

```
aws s3 cp s3://cg-keystore-s3-bucket-rce-webapp/cloudgoat . --profile McDuck
```

<figure><img src="/files/32t1RsEuRgBgTDqrqr1y" alt=""><figcaption></figcaption></figure>

## Describe-Instances

```
aws ec2 describe-instances --profile McDuck
```

<figure><img src="/files/rmGPtIh9n2gdEuPLn4Zc" alt=""><figcaption></figcaption></figure>

## Describe DB Instances

```
aws rds describe-db-instances --region us-east-1
```

<figure><img src="/files/TqjjQ23E3sEdgqxLHBU4" alt=""><figcaption></figcaption></figure>
