rohitkhatana / aws

python scripts for interacting with aws

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

aws

This repo contains python scripts for interacting with aws

This get_ips_by_alb_target_group_arn.py script is written to generate dynamic inventory for ansible.

For fetching the IPs attached to a target group of ALB

  1. First change the config file:
profile_name = 'profile_name'
region_name = 'region_name'
arn = 'arn'
group_name = 'app1-group'
  1. Install the PIP packages (recommend use virtualenv before installing the packages)

pip install -r requirements.txt

  1. Run the scripts

python get_ips_by_alb_target_group_arn.py

  1. Passing dynamic inventory to ansible playbook

ansible-playbook main.yml -i get_ips_by_alb_target_group_arn.py

For Flushing the cdn

  1. First change the config file:
profile_name = 'profile_name'
region_name = 'region_name'
arn = 'arn'
group_name = 'app1-group'
disribution_id = ''
  1. Install the PIP packages (recommend use virtualenv before installing the packages)

pip install -r requirements.txt

  1. Run the scripts

python cloudfront.py flush

About

python scripts for interacting with aws


Languages

Language:Python 100.0%