Discover and Publish Cloud Resources hosted in AWS

This article describes features - AWS Discover and Publish - that are currently in early preview. Contact your account team to enable these features for your organization and for further assistance.


Banyan leverages AWS tags to automatically discover the AWS resources that need to be accessed by your end users. You can then publish these discovered resources as Banyan services.


At a high level, you will:


Before proceeding through the steps below, ensure you have installed and configured the Python clients needed to interact with the Banyan and AWS APIs.

Then, using pybanyan, run the test-aws subcommand to ensure you’re correctly authenticated and authorized.

$> banyan discovered-resource test-aws
--> AWS configuration test passed. Found 10 resources.

Step 1. Tag your resources in AWS

In the AWS console, add tags to the resources you need to discovered by Banyan. For this guide, we use the tag banyan:discovery to label resources that should be discovered by Banyan, but you can use any tag for this purpose.

In the AWS console, navigate the the Tags section to view the resources you have tagged.

Step 2. Sync resources into Banyan

Now that your resources are tagged for discovery, use the pybanyan sync-aws subcommand to get the resource metadata from AWS and submit them via the Banyan API.

$> banyan discovered-resource sync-aws EC2 banyan:discovery

--> Getting list of AWS Resources:
press enter to continue, type "stop" to stop ...

region     id     private_ip       tags  cloud_provider    type    name    resource_name
---------  -----  -------------  ------  ----------------  ------  ------  ---------------------
us-east-1  i-0e6         3  AWS               ec2             cr-wiki-js1-org
us-east-1  i-0f9      12  AWS               ec2             td-kube-node-1-1f-pvt
us-east-1  i-0f1       12  AWS               ec2             td-kube-node-1-1f-pvt
us-east-1  i-055       4  AWS               ec2             td-server1-1f-pvt

--> Syncing into Discovered Resource:
press enter to continue, type "stop" to stop ...

--> Sync with AWS successful.

You have to specify both the resource_type (EC2, RDS, ELB, etc) as well as the tag_name to synchronize resources. Please submit an Issue or Pull Request in the pybanyan Github repository if you need to extend the discovery capabilities to additional AWS resource types.

Step 3. Select discovered resources to publish

Once your cloud resources are synchronized, you will be able to view them in the Manage Services > IaaS Inventory section in the Banyan Command Center.

Select an individual resource to see more details, such as Private IP Address, Ports and Tags.

Step 4. Publish services

Click on the Publish icon to publish a Banyan service from of this discovered resource. Populate the required fields - such as service domain, access tier, etc - and attach a policy.


Congrats! You have discovered your AWS resources and published them for your end-users. You can repeat this process as often as you need.

Last modified: Jul 22, 2021