AWS/boto3/json
-
Python/boto3 script to generate a CSV report for all the AWS Security groups NOT attached to any resource
Recently while working the customer, I was asked if there is any way to find all the Security groups that are NOT attached to any resources. It was more from housekeeping perspective. Ofcourse one can find it from within the AWS Console but the problem multiplies many fold if you are operating out of hundreds… Continue reading
-
Collection of some very useful scripts that you can run against your AWS Workload to generate various reports in CSV format
1.Script to generate Amazon EC2 Inventory report 2.Script to generate Amazon RDS Inventory report How to run the script: Make sure you have python/python3 installed, configured and is in path. Script takes 3 arguments. Usage: python <script_name> -id <AWS Account ID> -r <AWS Region> -f <CSV file name with path> e.g. if the script name… Continue reading
-
Boto3/Python script to list down all the EC2 instances making calls to Instance Metadata using IMDSv1
This blogpost is in context of recently released update to AWS EC2 instance metadata service (IMDSv2) for improving security and adding an additional defence in depth layer. Recently encoutered a scenariio where customer would like to get the list of EC2 instances that can be safely upgraded to IMDSv2 – without any impact to the… Continue reading
-
Boto3 script to delete existing VPC Interface Endpoints from a given AWS Account
Recently developed a script using Boto3 and Python to delete specific VPC Interface Endpoints. These endpoints were deployed as part of landing zone resources but are not being used currently. Such resources incur cost and hence if not used, it is good to remove them to save some cost. Intent is to call this script… Continue reading
-
Script to Enable AWS S3 Server Access Logging using Boto3
Many times we come across a situation where S3 Bucket access logging is not default and due to corporate security policy, such buckets are flagged a Security incident. Hence there was a need to enable the sever access logging programmatically due to very large number of such S3 Buckets. Recently I developed a script using… Continue reading
-
Script to generate CSV for Compute Optimizer data from a Json file
Below is the script to generate a CSV file from a JSON output. I wrote this script for generating CSV for collecting compute optimizer data so that each EC2 has one line of data in the CSV file. Later on this CSV file is uploaded to google sheet for further analysis. Python script “reportComputeOptData.py” is… Continue reading
About Me
I’m a Hands-On Technical & Entrprise Solutions Architect based out of Houston, TX. I have been working on Oracle ERP, Oracle Database and Cloud technologies for over 20 years and still going strong for learning new things.
You can connect me on Linkedin and also reach out to me
I am certified for 8x AWS, OCP (Oracle Certified Professionals), PMP, ITTL and 6 Sigma.
Disclaimer
This is a personal blog. Any views or opinions represented in this blog are personal and belong solely to the blog owner and do not represent those of people, institutions or organizations that the owner may or may not be associated with in professional or personal capacity, unless explicitly stated.
All content provided on this blog is for informational purposes only. The owner of this blog makes no representations as to the accuracy or completeness of any information on this site or found by following any link on this site.
The owner will not be liable for any errors or omissions in this information nor for the availability of this information. The owner will not be liable for any losses, injuries, or damages from the display or use of this information. Any script available on the blog post MUST be tested before they are run against Production environment.
Recent Posts
- Python/boto3 script to generate a CSV report for all the AWS Security groups NOT attached to any resource
- Collection of some very useful scripts that you can run against your AWS Workload to generate various reports in CSV format
- Boto3/Python script to list down all the EC2 instances making calls to Instance Metadata using IMDSv1
- “git push” keeps asking password [Deprecating password authentication]
- Boto3 Script to create and attach an EBS Volume to an EC2