Tag Archives: boto3

[python]Start up script to create VPC to launch EC2

Use case This is an interactive start up script to do from creating VPC to launching EC2. This is a follow up from this post – Functions for aws automation, I have added a few more functions to make it … Continue reading

Posted in Python, Scripting | Tagged , , , , , , , | Leave a comment

[python]Creating security group and inbound rule

This is the extension of Functions of aws automation.I have added some methods to create security groups and apply rules. In addition to the functions/methods describe here, I have created 4 more methods to accomplish these: Security group creation Inbound … Continue reading

Posted in Python, Scripting | Tagged , , , , , , | Leave a comment

[python]Create keypair in EC2

This is a simple code using boto3. To generate the key pair for EC2 here’s the simple code.

Posted in Python | Tagged , , , | Leave a comment

[python]Finding your internet gateway id in aws

On previous post, I have this function: This function looks for the internet gateway id associated with your vpc id. Json response from describe_internet_gateways The below response is from the describe_internet_gateways method in boto3, here’s the code snippet: The below … Continue reading

Posted in Python, Scripting | Tagged , , , , , | Leave a comment

[python] Functions for aws automation

This post is a documentation of the functions/methods in the python script that will help to automate the AWS. Declaration The filter can be found in Automated Ramblings. Resource connection This function connects to the resource based on the one … Continue reading

Posted in Python, Scripting | Tagged , , , , , , | 1 Comment

[python]Creating subnets based on VPC you have chosen

Background I am trying to test a few functions of my script for things that can be done after VPC was created. Things such as make subnet either public or private, attach IGW to route table. I have build up … Continue reading

Posted in Python | Tagged , | Leave a comment

[python]Update a list to a dictionary

the code below enumerate the list of vpc-id and make them into dictionary, the purpose is to make use of this dictionary to give a menu option for user.

Posted in Python | Tagged , | Leave a comment