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

The program 'docker' is currently not installed.

docker -v
The program 'docker' is currently not installed. You can install it by typing:
sudo apt install
(my_env) ubuntu@ip-192-31-19-128:/tmp$ sudo apt install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  bridge-utils cgroupfs-mount containerd runc ubuntu-fan
Suggested packages:
  mountall aufs-tools debootstrap docker-doc rinse zfs-fuse | zfsutils
The following NEW packages will be installed:
  bridge-utils cgroupfs-mount containerd runc ubuntu-fan
0 upgraded, 6 newly installed, 0 to remove and 22 not upgraded.
Need to get 16.4 MB of archives.
After this operation, 83.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 xenial/main amd64 bridge-utils amd64 1.5-9ubuntu1 [28.6 kB]
Get:2 xenial/universe amd64 cgroupfs-mount all 1.2 [4970 B]
Get:3 xenial-updates/universe amd64 runc amd64 1.0.0~rc2+docker1.12.6-0ubuntu1~16.04.1 [1479 kB]
Get:4 xenial-updates/universe amd64 containerd amd64 0.2.5-0ubuntu1~16.04.1 [4041 kB]
Get:5 xenial-updates/universe amd64 amd64 1.12.6-0ubuntu1~16.04.1 [10.8 MB]
Get:6 xenial-updates/main amd64 ubuntu-fan all 0.9.2 [30.7 kB]
Fetched 16.4 MB in 1s (12.2 MB/s)
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Selecting previously unselected package bridge-utils.
(Reading database ... 62405 files and directories currently installed.)
Preparing to unpack .../bridge-utils_1.5-9ubuntu1_amd64.deb ...
Unpacking bridge-utils (1.5-9ubuntu1) ...
Selecting previously unselected package cgroupfs-mount.
Preparing to unpack .../cgroupfs-mount_1.2_all.deb ...
Unpacking cgroupfs-mount (1.2) ...
Selecting previously unselected package runc.
Preparing to unpack .../runc_1.0.0~rc2+docker1.12.6-0ubuntu1~16.04.1_amd64.deb ...
Unpacking runc (1.0.0~rc2+docker1.12.6-0ubuntu1~16.04.1) ...
Selecting previously unselected package containerd.
Preparing to unpack .../containerd_0.2.5-0ubuntu1~16.04.1_amd64.deb ...
Unpacking containerd (0.2.5-0ubuntu1~16.04.1) ...
Selecting previously unselected package
Preparing to unpack .../docker.io_1.12.6-0ubuntu1~16.04.1_amd64.deb ...
Unpacking (1.12.6-0ubuntu1~16.04.1) ...
Selecting previously unselected package ubuntu-fan.
Preparing to unpack .../ubuntu-fan_0.9.2_all.deb ...
Unpacking ubuntu-fan (0.9.2) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (229-4ubuntu19) ...
Setting up bridge-utils (1.5-9ubuntu1) ...
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Setting up cgroupfs-mount (1.2) ...
Setting up runc (1.0.0~rc2+docker1.12.6-0ubuntu1~16.04.1) ...
Setting up containerd (0.2.5-0ubuntu1~16.04.1) ...
Setting up (1.12.6-0ubuntu1~16.04.1) ...
Adding group `docker' (GID 116) ...
Setting up ubuntu-fan (0.9.2) ...
Processing triggers for systemd (229-4ubuntu19) ...

Processing triggers for ureadahead (0.100.0-19) ...

conda install traitlets tornado jinja2 sqlalchemy 

conda: command not found

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 :


Online Training

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

Powered by Blogger.

Recent Posts

Find Us On Facebook

Popular Posts