This forum provides solutions for aws developers for their issues.It provides solutions for aws elastic ip, ec2 instance, public ip,route53 pricing, load balancers in aws,Orchestration, ebs,, lambda, installing mongodb on ubuntu etc.

Monday, 7 August 2017

Permission error- Unable to ssh into Amazon EC2 instance

ssh -i ec2-instance-cert.pem root@publicip or public dns

Permissions 0644 for 'test.pem' are too open.
It is required that your private key files are NOT accessible by others.

Solution :
key must not be publicly viewable for SSH to work. Use this command if required

$ chmod 400 ec2-instance-cert.pem

Sunday, 6 August 2017


It is an object modeling tool for nodejs that connects MongoDB.Mongoose take the models and maps them to MongoDB database.

install required dependencies
npm install mongoose

var mongoose = require('mongoose');

/*without callback */

/* with callback */ create a connection object and bind two callabcks.

var db = mongoose.connection;
db.on('open',function callback(){
//connection success
//connection error

Schema Creation :

var empSchema = mongoose.Schema({
name: String,
designation : String,
location: String,
Skills: String

Model Creation :

var Employee =  mongoose.model('employee',empSchema);

Saving the model :,emp){
//error handling

Reading the model :

var Employee =  mongoose.model('employee',empSchema);

//error handling

Reading specific model :

//error handling


[{name:'SrinivasNidadavolu',designation:'software engineer',location:'building number 14,Raheja Mindpsace, Hyderabad',Skills:'Java,C++,AWS,AZURE,Containers,cloud specialist'}]

Elastic Load Balancing

Elastic Load Balancing automatically distributes the incoming application traffic across multiple was ec2 instances.

Two types of load balancers :
Application Load Balancer
Classic Load Balancer

Elastic Load Balancing :
It is in-region load balancing service and distributed traffic  across multiple availability zones -HTTP/S, TCP/S.
Fully fault tolerant
Buit in health check

Application Load Balancer Features:
• It has Containerized Application Support
• It has Content-Based Routing
• It support for  HTTP/2
• Contains Delete Protection
• Supports WebSockets
• Supports Layer-7 Load Balancing
• Supports Web Application Firewall (WAF)
• Contains Request Tracing

Classic Load Balancer Features:
• Contains Health Checks
• It has High Availability
• Supports Security Features
• Supports Sticky Sessions
• Supports SSL Offloading
• Support for Layer 4 or 7 Load Balancing
• It has Operational Monitoring
• provides Logging
• provides IPv6 Support

Saturday, 5 August 2017

Creating Database MongoDB

MongoDB is document based database.
Creating Database NodeJS - MongoDB

Once mongoDB is up and running,

var mongoDB =  require('mongodb');

var mydbserver =  new mongodb.server('localhost', 27017, {auto_reconnect:true});

/* new mongodb.Db() creates a new database */
/* w:1 sets the write concern */

var database =  new mongodb.Db('eCommerceDb',mydbserver, {w:1});

Collections :

Relational databases uses tables to store data. MongoDB stores data as document format uses collection. It is NoSql type database.

Collections are represented as JSON format.

Tuesday, 1 August 2017

Installing MongoDB

Mac Installation :

The easy way to install MongoDB is by using package manager like Homebrew  or MacPorts.
$ sudo brew install mongodb
sudo port install mongodb
Setup the data directory
sudo mkdir -p /data/db
setup appropriate permissions
$ sudo chown 'id -u' /data/db
Ubuntu Installation :
To authenticate apt-get package, install the public GPG key from MongoDB creators.
sudo apt-key adv --keyserver --recv 7F0CEB10

create a file /etc/apt/sources.list.d/10gen.list  and  add the below text

deb dist 10gen
Install latest stable build of MongoDB
$ sudo apt-get update
$ sudo apt-get install mongodb-10gen
Windows Installation :
Download the latest stable build from
Make sure appropriate version 64 bit or 32 bit
Install with the installation file.
create the data directory 
mkdir data
mkdir data\db
Running MongoDB
On Mac :

On Ubuntu :
$ sudo service mongodb start
On Windows :

Monday, 31 July 2017

Features of MongoDB

One of the  main reasons  to use NOSQL database is built in sharing capabilities.
Sharing allows to distribute single database across cluster of machines.

It means, distribute the load rather than purchasing the large server. 
Sharing also help in server handling big data. The data stored in database is increasing exponentially. 
Some databases are very large for each server. So distribution across cluster is necessary. 

No sql databases are lot easier to maintain with the administration tools.

It also supports aggregation (Batch data processing ) and aggregate calculations using the native operations.
It is a schema less database.
It supports map reduce (Large volume of data into useful aggregated data.)
It also supports geospatial and secondary indexes on the collections.

Indexes are efficient execution of queries.Create a simple and complex indexes which will be used for speeding up the query execution.

Friday, 28 July 2017

What is Amazon ElasticCache ?

Many applications getting popular which is great, but when it comes to performance under heavy load, it is very bad. At the peak times, users are just giving up.
How we can solve this issue without re-engineering the application?

Amazon ElasticCache will solve the problem. It improves the performance of web applications by allowing the retrive the information fast, in-memory caches instead of relying on slow disk based databases.
It automates the time consuming tasks such as infrastructure provisioning, managing persistance,installing the software and patch management etc.

Amazon ElasticCache are managed in-memory service. You can define a cluster of nodes. You have the option for redis as well.
AWS will take care of the cluster management, in-memory cache etc.


Online Training

Your Name :
Your Email: (required)
Your Message: (required)

Powered by Blogger.

Recent Posts

Find Us On Facebook

Popular Posts