Tuesday, January 31, 2017

AWS Route 53

Amazon Route 53 (Route 53) is part of Amazon.com's cloud computing platform, Amazon Web Services (AWS). Route 53 provides a scalable and highly available Domain Name System (DNS). The name is a reference to TCP or UDP port 53, where DNS server requests are addressed. In addition to being able to route users to various AWS services, including EC2 instances, Route 53 also enables AWS customers to route users to non-AWS infrastructure. Route 53's servers are distributed throughout the world. Amazon Route 53 supports full, end-to-end DNS resolution over IPv6. Recursive DNS resolvers on IPv6 networks can use either IPv4 or IPv6 transport to send DNS queries to Amazon Route 53.
One of the key features of Route 53 is programmatic access to the service that allows customers to modify DNS records via web service calls. Combined with other features in AWS, this allows a developer to programmatically bring up a machine and point to components that have been created via other service calls such as those to create new S3 buckets or EC2 instances.
AWS supposedly named the service Route 53 because all DNS requests are handled through port 53, and the "route" piece resembles the historic "Route 66" of the USA. And Route is basically for routing any traffic to Amazon DNS.

Monday, January 30, 2017

Developer Guide for AWS Lambda using Node.JS

Developing Simple Lambda function using Node.js

Pre Requisite:
• AWS Account
• Visual Studio
• Node.JS tool

Step 1: Create Lambda function in Visual Studio
Step 1.1 Open Visual Studio (Run as Administrator)
Add Lambda Project in Visual Studio
File -> Add New Project
Create new project as “Hello World”.
On Next screen select – Create Simple project
Click Finish.
Below screen will appear after click on Finish.
By default some files will be added in project which we can be found in Solution explorer.
  1. _testdriver.js  : This is a utility file to help invoke and debug the lambda function. It is not included as part of the bundle upload to Lambda.
  2. _sampleEvent : This is JSON file use to set Event sample event data to test / debug
  3. App.js : Main program file in which we will write code (Application logic)
  4. npm : Node Package module. Utility to install NPM package
  5. node_modules : Repository for node.js packages. Folder contains supporting node module files. By default it contains “aws-sdk” module. When add new module it will automatically get updated and store supporting file
Open App.JS file, file contains below code:
exports.handler : start execution of your Lambda function

Step 1.2 – Update _sampleEvent.json file
Step 1.3 – Update app.js file with below code
Step 1.4 – Run Application (Press F5), below screen should appear which contains Event information from _sampleEvent.JSON file
This complete our Hello world program.

Step 2: Deploy Lambda function in AWS console
Step 2.1: Open AWS console and find Lambda under Compute service.

Step 2.2: Screen will show List of Lambda functions. Click on Create Lambda function button
Step 2.3: Screen will show list of Blueprint use to create Lambda function. We can select existing blueprint or Skip this part and move next.
Click on Skip button on screen (Bottom right corner)
Step 2.4: Configure Lambda function.
Configure function - Set Name,Description,Runtime.
Set Lambda Function code details as shown below
Code entry type: Upload ZIP file
Handler: Main JavaScript file, in our case it is app.js. Update Handler Textbox as app.handler.
Role: Set role as lambda_basic_execution

Step 2.5: Create Zip folder contains code and Node modules
To create ZIP file open Physical location of Lambda code (HelloWorld Lambda Developed in VS2013)
Select below files/folder for ZIP,
1.    Node_modules
2.    App.js
Step 2.6:  Set Advanced settings.
Review Lambda function
Click on Create Function button. This will create your First Lambda Function.

Step 3: Configure Test Event and Test Lambda function
Step 3.1:  To set Test event click on Action button and select “Configure test event” option.

Select event template and set data. This is same data which we used to test in debug mode. You can find this in _sampleEvent.json file. Click Save button (Bottom Right corner)
Click on Test button to test Lambda function. Scroll down and you will see below content on screen.
Highlighted section in Blue is output generated by Context object.
Section highlighted in yellow is output log.

Step 4: See Test result logs in CloudWatch
Step 4.1: To check logs in click on Monitor Tab. Click “View logs in CloudWatch”
You can see details logs on new screen.

Tuesday, January 10, 2017

C++ 17: A Newer Version of C++ to bring more power and simplicity

There is no programmer in the world who don’t know about C++ programming language. The updated version of C language with object orientation. C++ was introduced 33 years ago by Bjarne Stroustrup. As long as you keep it simple C++ is a good and reasonably modern object-oriented language that is still close enough to the machine architecture to produce programs that run about as fast as possible.
The new C++ 17 standards are introducing new features like structured bindings and if initialisers, making this vintage programming language “feature complete”. The C++ community is calling C++17 the start of a new era that will bring powerful technical specifications and overcome the known issues.
List of the most features that will be on C++ 17:
  • C++17 is based on C11
  • Dynamic memory allocation for over-aligned data
  • Guaranteed copy elision
  • Forward process guarantees (FPG)
  • Structured bindings
  • if (init; condition) and switch (init; condition)
  • constexpr if
  • Inline variables
  • A weaker version of fixed order-of-evaluation for expressions
  • Template argument deduction for class templates
According to the c++ community, this major update aims to make C++ an easier language to work with and brings powerful technical specifications.

Sunday, January 1, 2017

New Year Greetings 2017


Your success and happiness lies in you.
Resolve to keep happy, and your joy and you shall form an invincible host against difficulties.