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.

Wednesday, 5 July 2017

Create Docker image and push it to Docker Hub

In this tutorial, you will learn about docker containers, creating docker images and push the docker images to Docker Hub(hub.docker.com/)registry.

What is docker and what is a container ?

Docker is a tool, which allows deploying the applications in a container to run on the host operating system.
Container allows developer to package an application with all the required modules into a single standard unit.

Containers shares the resources in the operating system where for virtual machines need to allocate the resources.

Here am going to explain with hello world application using nodejs.

The command used to build the image using dockerfile.
docker build -t dockerhub-username/container-name

Below command is  used to run the container after generating the img from the dockerfile.

docker run -p 3000:3000 dockerhub-username/container-name

Push the docker image to Docker Hub.

Login into the docker

docker push dockerhub-username/container-name

 I have created a simple hello world app using nodejs. Deploying the application with dockerfile and the docker commands.

https://github.com/SrinivasNidadavolu/docker-nodejs-dockerhub


Monday, 3 July 2017

Route 53 pricing

AWS charges only for configured Hosted zones and number of dns queries aws answers.

Per Month :
$0.50/hosted zone upto 25 hosted zones

After 25 hosted zones,

$0.10/hosted zone will be charged.

Traffic Flow :

Aws charges $50.00/policy record / month.

Standard Queries /month :
$0.40/million - first 1 Billion queries
$0.20/million - over 1 Billion queries

Geo DNS queries :
$0.70/million queries - first 1 Billion queries
$0.30/million - over 1 Billion queries

Latency Based Routing queries :
$0.60/million queries - first 1 Billion queries
$0.30/million - over 1 Billion queries

Health Checks :
Basic health checks for AWS Endpoint $0.5/healthcheck/month,
Non AWS Endpoint $0.75/healthcheck/month

Domain Name registration price varies based on market value.





Saturday, 1 July 2017

Route53 - ChangeResourceRecordSet - Update issue


 params = {
                                "HostedZoneId": '/hostedzone/hotedzone id', // our Id from the first call
                                "ChangeBatch": {
                                  "Changes": [
                                    {
                                      "Action": "UPDATE",
                                      "ResourceRecordSet": {
                                        "Name": test.example.com ,
                                       "Type": "CNAME",
                                        "TTL": 86400,
                                        "ResourceRecords": [
                                          {
                                            "Value":  52.145.32.32
                                          }
                                        ]
                                      }
                                    }
                                  ]
                                }
                              };
                           }

Invalid Input

Error: Invalid XML ; cvc-enumeration-valid: Value 'UPDATE' is not facet-valid with respect to enumeration '[CREATE, DELETE, UPSERT]'. It must be a value from the enumeration. at Request.extractError


Solution : Use Action as "UPSERT" instead of "UPDATE"


 params = {
                                "HostedZoneId": '/hostedzone/hotedzone id', // our Id from the first call
                                "ChangeBatch": {
                                  "Changes": [
                                    {
                                      "Action": "UPSERT",
                                      "ResourceRecordSet": {
                                        "Name": test.example.com ,
                                       "Type": "CNAME",
                                        "TTL": 86400,
                                        "ResourceRecords": [
                                          {
                                            "Value":  52.145.32.32
                                          }
                                        ]
                                      }
                                    }
                                  ]
                                }
                              };
                           }

Access Denied - Route53 - AWS - Create IAM policy

Error: User: arn:aws:iam::502616337927:user/example is not authorized to perform: route53:ChangeResourceRecordSets on resource: arn:aws:route53:::hostedzone/W3MS19SVPW6HSSFGDHFGSHDF at Request.ext

To create a dns record, you need an IAM policy attached to the IAM user.

Create  IAM Policy



{
   "Version": "2012-10-17",
   "Statement": [
      {
         "Sid" : "AllowPublicHostedZonePermissions",
         "Effect": "Allow",
         "Action": [
            "route53:CreateHostedZone",
            "route53:UpdateHostedZoneComment",
            "route53:GetHostedZone",
            "route53:ListHostedZones",
             "route53:GetHostedZoneCount",
            "route53:ListHostedZonesByName"
            "route53:DeleteHostedZone",
            "route53:ListResourceRecordSets",
            "route53:ChangeResourceRecordSets"
         ],
         "Resource": "*"
      },
      {
       "Sid" : "AllowHealthCheckPermissions",
         "Effect": "Allow",
         "Action": [
            "route53:CreateHealthCheck",
            "route53:UpdateHealthCheck",
            "route53:GetHealthCheck",
            "route53:DeleteHealthCheck",
            "route53:ListHealthChecks",
            "route53:GetCheckerIpRanges",
            "route53:GetHealthCheckStatus",
            "route53:GetHealthCheckCount",
            "route53:GetHealthCheckLastFailureReason"
         ],
         "Resource": "*"
      }
   ]
}



Friday, 30 June 2017

535 Authentication Credentials Invalid

Email ErrorError: Invalid login: 535 Authentication Credentials Invalid


Solution : Your email sending app does not provide correct SMTP credentials to Amazon SES. Provide the correct credentials.
Please check you app sending correct credentials.


Once your authentication success, you will get  - 235  for Authentication successful
                                                                     - 250  for Successful delivery
                                                                     - 454  for daily sending quota exceeded.
                                                                     -454  for maximum sending rate exceeded.
                                                                     -454 for problem in receiving the request or                                                                                validating SMTP credentials.



What are microservices ?

Microservices are an Architectural style in which large and complex applications are composed into one or more smaller services.

I will explain you with online store.
It has a product catalague, shopping cart to buy stuff,My orders to track the status of the order,
Product Serch function and Special Promo.


Traditional Architecture:
Traditional Architecture builts these features into single application, single database.Adding new features into these becomes tightly coupled dependencies.
The application is manage with the single package.

Microservices Architecture :

Microservices Architecture, each feature is built in isolation, independent of the all the other features.
HTTP REST or Message Bus is used to communicate with each other asynchrously.

Why would i need Microservices ?

Traditional Architecture creates large monolithic packages that can be challenging to deploy.
Configuration is can be hard to manage.
Deployments will be difficult.


Microservices are small. Packaged and deploy independent of each other, that makes configuration easier to manage.
Multiple times can be deploy easily.







Monday, 26 June 2017

Block Storage vs Object Storage

What is the difference between block storage and object storage in aws?

Block Storage :

Block storage block level operations are possible. Hence one block is changed that contains the changed data.

Example : AWS EBS storage

Object Storage :

Entire file must be removed and new file need to put there

Example : AWS S3 storage

Labels

Online Training

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

Powered by Blogger.

Recent Posts

Find Us On Facebook

Popular Posts