Auto-closure of SNOW incidents by querying Data protector!

The data protector engine runs scheduled jobs and whenever a job fails, an incident created in service now. Next, the data protector engine re-runs the failed job automatically. But even if they are successful on the next re-runs, the incidents are not resolved and someone has to manually go in and close all incidents. That's painful because there are hundreds of jobs that run in the data protector in parallel. Also, someone has to keep an eye on the Service Now incidents regularly.

Fortunately, this can be automated and those incidents can be closed automatically on a scheduled basis. …

Add these snippets to your code and level up!

If you ask any Python programmer to tell about the strengths of Python, he will quote brevity and high readability as the most influencing ones. Python strives to make developers happy with its simpler, less-cluttered syntax.

Attention geeks! In this article, I have compiled tricks that I have discovered.

Tip #1 Range Dictionaries

As of the latest version python doesn't support range dictionaries. But here is a trick

class RangeDict(dict):
def __getitem__(self, item):
if not isinstance(item, range):
for key in self:
if item in key:
return self[key]
raise KeyError(item)
return super().__getitem__(item)

to use this create a range dictionary like this —

sample_dict =…

MS SQL is a proprietary RDBMS from Microsoft and MySQL is a free and open-source RDBMS backed by Oracle. And with an increasing number of organizations transitioning from proprietary to open-source software, migration from MS SQL to MySQL database is gaining momentum.

This is not the actual way one should migrate but I simply avoided a lot of grey areas like —

  1. Schema conversion
  2. Data loss risk
  3. Time consumption
  1. The table I was trying to migrate had more than 40 columns.
  2. The table had all the standard delimiters that you can think of.
  3. There were lots of NULL values all…

A Python backend script to automate the CPM recovery which saves some time and doesn't make you sick.

You all must have read several articles on automating backups of EC2 Instances. It is critical for today’s infrastructures. The modern application needs automated backup and disaster recovery processes for ease in managing and creating a scalable and robust environment. It is generally a one-time setup for backups. But on the other hand, you need to click several times for a recovery process to initiate.

Need of the hour? — Automation.

The good news is there are APIs to help to achieve it. There is good documentation that explains stuff. But I preferred using the chrome inspect network tool to…

Whenever we install a package in python, we use either pip or conda that connects to or for installer files. So keeping this in mind I opened my anaconda prompt.

base) C:\Users\Kuharan>python --version
Python 3.7.6

Cool. So I thought of simply going forward with the installation

(base) C:\Users\Kuharan>pip install couchbase
Collecting couchbase
Downloading couchbase-3.0.6-cp37-cp37m-win_amd64.whl (1.7 MB)
|████████████████████████████████| 1.7 MB 819 kB/s
Requirement already satisfied: wrapt>=1.11.2 in c:\users\kuharan\anaconda3\lib\site-packages (from couchbase) (1.11.2)
Requirement already satisfied: six in c:\users\kuharan\anaconda3\lib\site-packages (from couchbase) (1.14.0)
Requirement already satisfied: mypy-extensions in c:\users\kuharan\anaconda3\lib\site-packages (from couchbase) (0.4.3)
Requirement already satisfied: attrs>=19.1.0; python_version > "3.5" in c:\users\kuharan\anaconda3\lib\site-packages (from…

A Fully Automated Guide + Lambda Code to rotate IAM keys across multiple AWS accounts.

Work From Home Setup

AWS strongly recommends changing access keys (which consist of an access key ID and a secret access key) on a regular schedule, if you run applications on EC2 that need access to AWS services. It is a well-known security best practice because it shortens the period an access key is active and therefore reduces the business impact if they are compromised.

So change your access keys regularly, and make sure that all IAM users in your account do as well. That way, if an access key is compromised without your knowledge, you limit how long the credentials can be used…

The internet is insecure by default. SSL certificates add a level of safety.

Micro Focus Data Protector is an enterprise-grade backup and disaster recovery solution for large, complex, and heterogeneous IT environments. It is a backup solution that provides reliable data protection and high accessibility for your fast-growing business data and offers comprehensive backup and restores functionality specifically tailored for enterprise-wide and distributed environments.

A chatbot that returns the file information when asked about a file in the SharePoint site.

Part — 1: Get Nested folder paths and details from the Sharepoint site

Learn to execute SQL query on MYSQL RDS instance from an HTML-Javascript-Ajax-based web app with AWS lambda as a backend.

Let us start by creating a dataset for this demo, I am using Zomato Restaurants Hyderabad dataset. We’ll start by uploading the CSV to our RDS instance using MySQL workbench. This will quickly create a dataset for us to experiment with. Expand on schema_name → Tables → Right-click → Table data import wizard. Follow the self-explanatory steps. Run this select query and you should see your table in the DB.

Two Functions — One Solution

I have two freshly created ec2 instances for my example. We are going to update the tags for these two instances. Lets get started.

Kuharan Bhowmik

Data Engineer, Programmer, Thinker

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store