Skip to content

Code samples using Rust's Rusoto AWS Rust library through a http proxy

Notifications You must be signed in to change notification settings

lucdew/rusoto-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

Just an example using Rusoto AWS Rust library through a http proxy and Tokio async runtime.

It uses the STS, ECS and credentials AWS services.

The example here supposes that your organization has multiple AWS accounts and MFA authentication is required.

The program list the lastest ECS images in all ECS clusters.

The first execution, the following configuration will be asked:

  • If AWS credentials must be retrieved from the $HOME/aws/.credentials file ** If not, the an AWS access key and secret key will be asked ** If a STS token is not detected in the $HOME/aws/.credentials file, a MFA device ARN will be asked. And everytime the tool is run a MFA token will be asked to generate a STS token if the previously generated is non-existent or expired (with the related temporary access key and secret) ** It a STS token is detected in the $HOME/aws/.credentials file, it will assume it is still valid
  • Optional roles name/arn couples the tool will use them to retrieve the list of clusters and ECS images using the assumed roles

The configuration is stored in $HOME/.awsManager.json

To run just do

cargo run -- ""

Using a specific role arn:

cargo run -- "-a arn:aws:iam::123456789:role/MyRoleInTheOrganization"

Using a specific role from the configuration filtering by its name from the configuration :

cargo run -- "-r dev"

Currently it outputs the image name prefixed by the task definition name for each image

About

Code samples using Rust's Rusoto AWS Rust library through a http proxy

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages