Banyan uses the AWS SDK for Python to synchronize AWS resources into Banyan's inventory.
If you installed pybanyan
using pip
, get the AWS extra:
$ pip install pybanyan[aws]
Create an IAM User for programmatic access.
Assign the following built-in permissions for your IAM User:
- AmazonEC2ReadOnlyAccess
- AmazonRDSReadOnlyAccess
- ElasticLoadBalancingReadOnly
Add an access key for your IAM User and get the credentials.
Add a section named aws
in the ~/.banyan.conf
file with your IAM User credentials:
[banyan]
api_url = ...
refresh_token = ...
[aws]
aws_access_key_id = YOUR_KEY
aws_secret_access_key = YOUR_SECRET
You can discover resources across multiple accounts that belong to the same AWS organization. This capability hasn't been implemented yet.
Run the test command to verify access:
banyan cloud-resource test-aws
Run the sync command to synchronize your Iaas resources:
banyan cloud-resource sync-aws