December 23, 2017

Special Award for Contribution to Alma Mater 2017

Appreciation goes a long way and a recognition from your Alma Mater after 17 yrs of your graduation is something close to your heart.
I was delighted to receive the Special Award from Bannari Amman Institute of Technology for my contribution towards the technical guidance & lectures to the college as well as to the Bengaluru based BIT Alumnae as a Secretary of  BIT Alumni Chapter, Bengaluru.




December 13, 2017

Install CodeDeploy agent on EC2 Instance


 Code Snippet to install code deploy agent

When you provision EC2 instance for deployment to be done by AWS CodeDeploy, that EC2 instance should have CodeDeploy agent for deployment to proceed. https://docs.aws.amazon.com/codedeploy/latest/userguide/codedeploy-agent-operations-install-linux.html 

Option 1:


            yum update -y
            yum install -y ruby
            yum install wget

            cd /home/ec2-user

            wget https://aws-codedeploy-${AWS::Region}.s3.amazonaws.com/latest/install

            chmod +x ./install
            ./install auto  

service codedeploy-agent status 
service codedeploy-agent start


Option 2:


yum update -y 
            yum install -y ruby aws-cli 
  
            cd /home/ec2-user 
            aws s3 cp s3://aws-codedeploy-us-east-1/latest/install . --region us-east-1 
            chmod +x ./install 
./install auto

Note: Use sudo, if elevated privilege is required.

Overview of Sample Web Application Architecture

The Sample Web Application depicted below will include Web Servers, App Servers and Database Servers
-       There are two Availability Zones (AZ) in the Sample Web Application, in order to provide high redundancy and therefore high availability
-       Subnet is nothing but the range of IP addresses in a VPC
-       Network ACLs stands for Network Access Control Lists that are applied to subnets
-       Each AZ has one private subnet and public subnet
-       All subnets within a VPC is designed to talk to each other freely
-       Only public subnets are accessible from the internet
-       Servers in the private subnet can only make outbound calls to the Internet via the NAT server. No inbound traffic is accepted.
-       NAT have only one purpose here  -> allows instances on private subnets to call out to the Internet to download updates. Traffic from the Internet is not permitted to make inbound connections
-       Traffic is further restricted via security groups
-       NAT Instance is relatively old service and we have an alternative now called NAT Gateway, which was introduced in Re-invent 2016
-       Basically NAT Instance is an EC2 instance with certain configurations where you have to establish ASG to scale-up or down and enable fault tolerance whereas in NAT Gateway both elasticity and failover are handled by AWS.
-       AWS Internet Gateway - An Internet gateway is a horizontally scaled, redundant, and highly available VPC component that allows communication between instances in your VPC and the Internet.
-       Amazon Route 53 (Route 53) is a scalable and highly available Domain Name System (DNS)


When the user access the website www.mycloudapp.com either from his computer or mobile, the request goes to Route 53, passes through Internet Gateway & Elastic Load Balancer before hitting the Web Servers in public subnet. The Application Servers and Database Servers are placed in private subnet which can be accessed only by Web Servers. These Servers in private subnet can make only outbound calls to the Internet where they get their software updates, which happens through VPC NAT Gateway.



What is an ELB?
-       ELB stands for Elastic Load Balancing.
-       Elastic Load Balancing automatically distributes incoming application traffic across multiple Amazon EC2 instances & multiple availability zones.
-       ELB enables you to achieve greater levels of fault tolerance in your applications ensuring that only healthy Amazon EC2 instances receive traffic

-       ELB can automatically scales its request-handling capacity to meet the demands of application traffic.

November 23, 2017

NAT Gateway vs NAT Instances

Some around the web readings on NAT Gateway vs NAT Instances.

o NAT Instance – old one; NAT Gateway is relatively new, introduced in 2016
o http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-comparison.html
o NAT Instance is an EC2 instance
  •  Create an EC2 instance and put it behind default web SG, launch instance.
  •  Create a Route out to the internet from NAT Instance for the go ahead and disable “Source & Destination Check”
  • Attach the instance to the Private Security Group / Default one, go and edit the Route Table of the Main Route Table to allow internet – 0.0.0.0/0 to the newly created NAT Instance and select the NAT Instance Id (not IGW).
o NAT Gateway
  • NAT Gateway is service which AWS takes care of scaling up, scaling down under lying resources based on the need 
  • Most customers always use NAT Gateway in Production as Failover is taken care internally


NAT Instances
  • When creating a NAT instance, Disable Source / Destination check on the instance
  • NAT instance must be in a public subnet
  • There must be a route out of the private subnet to the NAT instance, in order for this to work
  • The amount of traffic that NAT instances supports, depends on the instance size. If you are bottlenecking, increase the instance size
  • You can create high availability using AutoScaling Groups, multiple subnets in different AZ’s and a script to automate failover. This is extremely painful but can be done. Customers always complain about this pain point and hence the NAT Gateways were created.
  • NAT Instances are always behind a SG.


NAT Gateways
  • Relatively new service
  • Preferred by the enterprise
  • Scale automatically upto 10 Gbps
  • No need to patch
  • Not associated with SGs
  • Automatically assigned with public IP
  • Remember to update your route tables
  • No need to disable Source / Destination checks.

November 3, 2017

Tips for `AWS Certified Solution Architect - Associate` Preparation

Self Evalution:

Take Diagnostic Test (60 questions 80 mins) in whizlabs practise-tests to guage your strength and weaknesses before you begin your preparation.
https://www.whizlabs.com/aws-solutions-architect-associate/practice-tests

If you have very limited knowledge wrt AWS, move on to #1 under Course Material.

Course Material

1. AWS Certified Solutions Architect - Associate 2017 from A Cloud Guru in www.udemy.com - Should be around $10.
Tips 1: This course starts from zero and covers upto 80% of the course, provided you read all the FAQs & white papers as advised by the instructor. Good to start with this and go for Linux Academy]
Tips 2: Complete all Labs & repeat VPC lab couple of times
Tips 3: Mobile app is also good, if you would want to listen on the move.
2. www.qwiklabs.com - AWS Certified Solutions Architect - Associate Badge (Optional)
3.AWS Certified Solutions Architect - Associate from Linux Academy 
Tips 1: Complete all labs from LA and read all the whitepapers referrred in downloads section. Subnetting & EC2 trouble shooting is well explained there.
Tips 2: Mobile app is also good if you would want to listen on the move, especially for the flash cards & final quiz.
4. Linux Academy - The Orion paper is a good reference material


Practise Tests

  1. Linux Academy Chapter Quiz - Final Quiz
  2. https://www.whizlabs.com/aws-solutions-architect-associate/practice-tests -> Costs around INR 899/- but around 20 questions will come from this whizlabs, so worth practising all 7 or 8 papers they have.

BLOGS


http://jayendrapatil.com/aws-solution-architect-associate-exam-learning-path/

FAQs

https://aws.amazon.com/faqs/
https://aws.amazon.com/ebs/faqs/
https://aws.amazon.com/vpc/faqs/
https://aws.amazon.com/ec2/faqs/
https://aws.amazon.com/s3/faqs/
https://aws.amazon.com/sqs/faqs/
http://aws.amazon.com/route53/faqs/
http://aws.amazon.com/lambda/faqs/
http://aws.amazon.com/rds/faqs/
http://aws.amazon.com/dynamodb/faqs/
https://aws.amazon.com/autoscaling/faqs/
https://aws.amazon.com/api-gateway/faqs/
http://docs.amazon.aws.com
https://aws.amazon.com/cloudwatch/faqs/
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-creating-snapshot.html