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 ⟶
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 ⟶
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 ⟶
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 ⟶
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 ⟶
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 ⟶
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 ⟶
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 ⟶
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 ⟶
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 ⟶