# AWS Config File

**URL:** https://discourse.roots.io/t/aws-config-file/17459
**Category:** trellis
**Created:** 2020-01-17T22:44:39Z
**Posts:** 4

## Post 1 by @JordanC26 — 2020-01-17T22:44:40Z

I have a plugin trying to find the following file: `.aws/config` at: `/home/vagrant/.aws/config` (this location on development anyway).

It does not currently exist, presuming it’s a file normally automatically generated. I noted the following command in this [post](https://discourse.roots.io/t/backing-up-trellis-sites-to-an-s3-bucket/12195): `export AWS_CONFIG_FILE="/home/web/.aws/config"`

I’m not looking to use the script in that post, but thought maybe in order to get my AWS config file generated, I should follow some of those instructions, this is what I’ve added so far:

Add to `trellis/group_vars/all/vault.yml` :

```
vault_aws_access_key_id: xxxxxxx
vault_aws_secret_access_key: "xxxxxxx"
```

With my AWS details in place, what should I run to create the `/home/vagrant/.aws/config` file?

---

## Post 2 by @JordanC26 — 2020-01-18T09:05:45Z

I found the updated fork for aws-cli in this post: [Aws-cli role can't install pip](https://discourse.roots.io/t/aws-cli-role-cant-install-pip/15140/2)

So I now have the following changes added:  
`trellis/group_vars/all/vault.yml` :

`trellis/requirements.yml` :

```
- name: aws-cli
  src: https://github.com/dstil/ansible-aws-cli
  version: 5c1c14d9b0e6264605bd475c86d4ea67e7d5896f
```

```
trellis/group_vars/all/vault.yml
```

```
vault_aws_access_key_id: xxxxxxx
vault_aws_secret_access_key: "xxxxxxx"
```

`trellis/server.yml` :

```
- { role: aws-cli, tags: [aws-cli] }
```

Wondering where should I do run actual aws-cli commands from?  
`/trellis`  
`vagrant ssh` in first?  
I tested `aws-cli` on /trellis, then also `vagrant ssh -> /src/www/mydomain.co.uk -> aws-cli` both times got back: `-bash: aws-cli: command not found`

---

## Post 3 by @swalkinshaw — 2020-01-21T01:09:11Z

I’ve never used aws-cli so I can’t really comment on it but yes you’d have to run the command on the VM/server.

---

## Post 4 by @system — 2020-02-28T22:47:16Z

This topic was automatically closed after 42 days. New replies are no longer allowed.
