aws-list-services

command module
v0.0.0-...-543451e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2020 License: MIT Imports: 2 Imported by: 0

README ¶

Open Weather Logo

List services concurrently in GO

This program list and write in json format a file.log RDS and Elasticache services available for specific region and IAM role, using go routines.

A go routine is a function that is capable of running concurrently with other functions.

Made by Christian Seki License


run with Build

execute go build main.go

then region=us-east-1 role=prod ./main

  • region can be any aws region options such as: sa-east-1 , us-east-1 and so on.
  • role must be prod , stage or old

What you will need 🔨

Assuming that you already have your AWS credentials in /.aws file.

create a .env file and set the role arn as env vars,to switch roles properly:

     role_prod=arn:aws:iam::123456:role/ProdblablaViewOnllyFULL-sadlp43
     role_stage=arn:aws:iam::14324324:role/StageblablaViewOnlyFULL-34234
     role_old=arn:aws:iam::21231:role/OldblablaFullAccess-214324
     role_auth=arn:aws:iam::109267741677:role/AuthblablaFullViewacase24

Output Interface 📜

    [count] x Instances: 
    {
        "Name": "instanceName",
        "Endpoint": {
            "Address": "address",
            "Port": 5432
        },
        "Engine": "postgres:11.5"
    }, ...
       
- Above is what expected in output terminal and instances.log file for each service listed.
  • May not print in the same order cause go routine can terminate in diferent times.

Documentation ¶

The Go Gopher

There is no documentation for this package.

Directories ¶

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL