# Setup Ansible server to manage several AWS Accounts using dynamic inventory?

**URL:** <https://forum.ansible.com/t/setup-ansible-server-to-manage-several-aws-accounts-using-dynamic-inventory/23380>\
**Category:** Ansible Project\
**Tags:** aws\
**Created:** [January 4, 2017, 6:51pm UTC](https://forum.ansible.com/t/setup-ansible-server-to-manage-several-aws-accounts-using-dynamic-inventory/23380 "2017-01-04T18:51:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![challa.tek](https://avatars.discourse-cdn.com/v4/letter/c/b38774/32.png) [@challa.tek](https://forum.ansible.com/u/challa.tek)\
**Post date:** [January 4, 2017, 6:51pm UTC](https://forum.ansible.com/t/setup-ansible-server-to-manage-several-aws-accounts-using-dynamic-inventory/23380/1 "2017-01-04T18:51:27Z")

</div>

How do i setup Ansible server to manage multiple Aws accounts using dynamic inventory,  
so, i have 20 Aws accounts and want to manage all those from single server (VPC’s in all accounts are peered with each other),  
So i have Installed Ansible and setup boto profile one for each account, by creating 20 profiles (i.e. 20 access and secret access keys) stored in boto credentials: ~/.aws/credentials.  
Is it the right way to manage multiple accounts  
i am using AWS\_PROFILE to specify boto profile while running playbooks.

---

<div class="post-metadata">

**Author:** ![alexey.vazhnov](https://avatars.discourse-cdn.com/v4/letter/a/b487fb/32.png) [@alexey.vazhnov](https://forum.ansible.com/u/alexey.vazhnov)\
**Post date:** [January 11, 2017, 6:48am UTC](https://forum.ansible.com/t/setup-ansible-server-to-manage-several-aws-accounts-using-dynamic-inventory/23380/2 "2017-01-11T06:48:28Z")

</div>

Looks good.  
I don’t have much experience with multiple AWS accounts. I think you can create 20 directories for independent inventory, for example: ‘inventory/acc01/’, ‘inventory/acc02/’, e.t.c. Then copy dynamic inventory script into this directories. And you can create static inventory files in this directories.
