Author Archives: cyruslab

[python]Get VPC ID

I am looking for a solution to get the vpcid so that i can start another script to add routes and subnets for the chosen vpc. See this post, which makes the below code possible. Results The json structure after … Continue reading

Posted in Python | Tagged , , | Leave a comment

[python]Create VPC part 2

Background This post is an improvement to this. The goal is to: Create VPC. Create internet gateway. Attach internet gateway to vpc. Name the internet gateway and vpc. About parameters in create_tags This method accepts Resources of type list or … Continue reading

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

[python]Naming the VPC

Background This is a follow up on previous post. The create_vpc does not have a parameter to name the VPC, instead another method create_tags is required for naming the VPC. From the documentation the create_tags takes in two arguments: Resources … Continue reading

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

[python]Create AWS VPC with boto3

Background This is a follow up on this post https://cyruslab.net/2018/10/19/pythontrying-out-aws-sdk/ back then I was only trying out… However I am beginning to take this seriously… as a hobby… Pre-requisites Setup awscli. The awscli is used to setup a default connection, … Continue reading

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

[python]what is my ip address

Background You have a VPN service running, but not sure if it is the VPN address or your real public address (supplied by your ISP of course), so you want to find out what is your public address and the … Continue reading

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

[python]Sample code to check if your email is pwned

Background https://haveibeenpwned.com/API/Consumers This is a free website where you can check if your email address is exposed from some hacked website which you are registered to.

Posted in Python | Tagged | Leave a comment

[DATABASE]Auto incremental on primary key

I created a relation ENTRY_TEST, the primary key is entryid which will be auto incremented, when inserting data I do not need to assign ID. I will insert a few values: Let’s check the relation:

Posted in General stuffs | Tagged , | Leave a comment