Leeladharan Achar - alias - leelu ~ blogging...hola mi amigos.. The Blog

Leeladharan Achar - leelu Blog. Hola mi amigos!

AWS SAM for Serverless

Getting Started with AWS SAM

To get started with AWS SAM, use the AWS SAM CLI to create a serverless application that you can package and deploy in the AWS Cloud. You can run the application both in the AWS Cloud or locally on your development host.

Setup AWS SAM CLI to deploy locally - Installing the AWS SAM CLI

...
More ...

Rotate Nginx logs, zip and transfer them to AWS S3 Bucket and remove the zip files from server

Steps

  • Rotate Nginx Logs daily/weekly as required and also by file size
  • Compress the logs date wise
  • Move the compressed files to AWS S3 within a folder of "AWS Instance Id" (if you are using AWS EC2 instance) else you can move it to any directory you need in S3
  • Remove the copied files in S3 from server
...
More ...

Building a REST API in Node.js with AWS Lambda, API Gateway and Serverless Framework

Prerequisite

  • AWS account
  • Node.js
  • AWS CLI and configure it

Getting Started with the Serverless Framework

To install Serverless on your machine, run the below mentioned npm command.

use sudo if required, for my mac book to install serverless globally, I used sudo

$ npm install serverless -g 

This will install Serverless command-line on your machine. You can ...

More ...

Enabling ENI on CentOS7

 187 yum update 188 modinfo ena 189 exit 190 modinfo ena 191 exit 192 ethtool -i eth0 193 aws ec2 modify-instance-attribute --instance-id i-xxxxxxxxxxxxx --ena-support 194 exit 195 yum -y install gcc make rpm-build 196 make 197 cd ena/ 198 ls 199 cd amzn-drivers/ 200 ls 201 cd kernel/ 202 ls 203 cd linux/ 204 ls 205 cd rpm/ 206 ... 

                        
More ...

Move PostgreSQL9.6 data directory to a different directory in CentOS 7

We wanted to move the PostgreSQL9.6 default data directory to home directory in centos7 due to space constraints of the partition we had in our root directory. So below are the steps to move default data directory of PostgreSQL to /home directory

Create a directory in /home for postgres data

Login as root and execute below commands

user$ su -l ... 

                        
More ...