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
“git push” keeps asking password [Deprecating password authentication]
Today morning while pushing the changes to the github repository, I was constantly asked to provide the username and password at the console. Despite passing the correct username and password, I was not able to push the changes and rather message below It was working fine till yesterday night and hence was wondering what could… 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
Error – gpg: cancelled by user/gpg: Key generation canceled.
While generating gpg key, I was getting error where the screen automatically goes off and the control immediately comes back stating below gpg: cancelled by user gpg: Key generation canceled. Solution Applied: It bugged a lot and finally googled the solution (putting it here for the sake of everyone) As a root user, run below… Continue reading
EBS- SSO Integration with Oracle Identity Cloud Service (IDCS)
Recently got an opportunity to do a POC for implementing SSO with Oracle EBS (12.2.5) using Oracle IDCS approach. It’s fairly simple and much less intrusive work as far as work within eBS is concerned. One primary component for this solution is EBS Asserter which needs to be deployed and configured in DMZ (Security policy… Continue reading
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.
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.
- 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