How to increase the volume of EC2 instance

In order to increasse the the volume of EC2 Instance you need to click on volume attached to your EC2. After that select the volume and choose the option "Modify Volume" from the action menu. It will open a dialog where it will ask you to input the require volume to...
Read More ⟶

Zip and unzip with command using terminal

There are various package that does this job but we will talk about `tar` that simply zip and uzip files and folders. This small article will show you how to zip and unzip with command using terminal. To zip files tar -czvf zip_file_name.tar.gz -C ./dist...
Read More ⟶

Upload files into AWS EC2 using aws cli

We all have heard about codepipeline which simply triggered by a source commit and start a pipeline to build application then deploy automatically to ec2 servers. Upload files to aws ec2. Well this article is not about code pipeline but a simple script that will make...
Read More ⟶

Kill any running port linux and mac

First of all, we need to find out the process id also known as PID of the running process on a specific port. For example, a process is running on port 3000. To find its process id, execute: lsof -t -i:4200 63562 Now you have the PID '63562' of the process...
Read More ⟶

Git tips and tricks

Revert last commit in GIT Revert last commit in GIt also knows as delete the last commit that was made intentionally or accidenlty. You can revert commit using following action. git reset --soft HEAD~1 git reset --hard HEAD~1 –soft will not remove your...
Read More ⟶

How to Bypass HTTP Interceptor while calling api

When injected, HttpBackend dispatches requests directly to the backend, without going through the interceptor chain. import {HttpBackend, HttpClient} from '@angular/common/http'; import {Injectable} from '@angular/core'; @Injectable({ providedIn:...
Read More ⟶

How to upload images to S3 bucket using Nodejs code.

Uploading images to S3 bucket using Nodejs code. The below code will upload any assets to mentioned AWS S3 bucket and return the uploaded details along with assets size in bytes. const AWS = require('aws-sdk'); const { Storage } =...
Read More ⟶

Symbolic representing in linux server

Search the path of actual installed packged detination. After that copy and run like below command. which npm which node which pm2 sudo ln -s /home/ec2-user/.nvm/versions/node/v16.15.1/bin/npm sudo ln -s /home/ec2-user/.nvm/versions/node/v16.15.1/bin/node sudo...
Read More ⟶

Re-Installing codedeploy agent in linux sever

Login to you linux server Remove any existing if already installed. sudo yum erase codedeploy-agent Remove any remaining logs at opt folder cd /opt sudo rm -r codedeploy-agent/ Install wget and codedeploy agent on instance using aws document. You can...
Read More ⟶

SNS notification target rule is “unreachable” when tryin to send a notification from code pipeline

Whenever you create an SNS topic by itself, the default access policy will look something like this: The default access policy shown as below is wrong and will not work.  { "Version": "2008-10-17", "Id": "__default_policy_ID", "Statement": [ ...
Read More ⟶