Find us on facebook

Oct 29, 2016

Pushnotification proceesor with AWS Lambda

Push Notification Processor is a microservice developed using AWS Lambda Node.js 4.3 runtime. To deploy the Lambda functions to AWS, the serverless framework is used.

Process:
To send bulk pushnotes, we use two SQS queues.
Platform -> 1st queue -> Execute 1st Lambda function -> 2nd queue -> Execute 2nd Lambda function to send pushnote to device

To execute lambda functions, we need a Role that has permission AmazonSQSFullAccess,AmazonSNSFullAccess

We can assign permissions to a role through AWS IAM (Identity Access Management).

In handler.js file, we can include all the functions.

Oct 8, 2016

XSS attack and CSRF attack

Cross-Site Scripting (XSS)

XSS is a code injection attack.The attacker tries to display a code which they control, in the target site. If target site allows HTML characters in a form field, where form field can be entered like "Something<script type="text/javascript" src="http://www.test.com/script.js"></script>" Here, when this field details are displayed in a page, the script too will run. Someone can use this script to grab sensitive information, log the key strokes, etc...

Cross-Site Request Forgery (CSRF)

This is also known as one-click attack or session riding. This is a form of attack where an authenticated user performs an action on a site without knowing it.


Sep 9, 2016

Serverless Apps with AWS Lambda

Serverless Framework

The Serverless Framework is a new cloud computing trend. It is open-source, command line tool and standard syntax that is used to easily build serverless architectures on AWS Lambda, Google Cloud Functions, and Windows Azure Functions.

"Serverless platforms allow developers to build apps without worrying about infrastructure."

Install the Serverless Framework

Make sure you have node and npm installed. You need node 4.0 or greater.

npm install serverless -g

Once the package is installed globally, you can create or download a new project and start working on your Lambda functions in JavaScript (Node.js 0.10 or 4.3) or Python 2.7.

Create project : serverless project create

Create Function : serverless function create function/SubFolder/FunctionName -s dev -r ap-northeast-1 (-s = dev or prod stage -r = aws region)

Deploy Function : serverless function deploy

Deploy Events : serverless event deploy EventName -s dev -r ap-northeast-1