Posts

AWS - Route53 Failover Policy

Image
  "Route 53 failover" refers to  a feature within Amazon Route 53, a DNS service, that allows automatic redirection of traffic to a backup server or region if the primary server or region becomes unavailable , essentially ensuring continuous website access even during outages by utilizing health checks to monitor the status of your resources and route users to the healthy endpoint. For this post, I have 2 webservers running web application on port 80. First, I am going to create Route53 Private Hosted Zone.  The zone name is " labexample.com ". I am making this zone as private, so that it can be accessed with AWS VPC. Once we have the zone, we need to create Route53 health check, this is a critical piece to monitor the primary server and enabled route53 to failover if the primary server fails. IP address to monitor is the IP address of the primary server. Here, we are mentioning how often to monitor and failure threshold. Next, we will create DNS record under the p...

SRE/DevOps Syllabus

Image
  DEVOPS/SRE Principles. Git What is Git? Architecture of Git. Working principle of Git. Create and cloning a repo. Version control branching. Version control commit. Version control managing workflows. Git hooks. Git Reflog. Git Stash. Git Cherry Picking. Undoing changes in different states of Git. Git based terraform template management. AWS CI/CD SDLC Automation. Code Commit. Code Build. Code Deployment. Code Pipeline. Elastic Beankstalk. Code Artifact. CodeGuru. Terraform Terraform Basics. Terraform State. Working with Terraform. Terraform with AWS. Remote State. Terraform Provisioners. Terraform Import, Tainting and Debugging. Terraform Modules. Terraform Functions and Conditional Expressions. Automation using Python - AWS AWS lambda. Automating EC2 with Lambda. Automating S3 with Lambda. Automating VPC with Lambda. Cost optimization with Lambda. SNS,SQS and SES with Python. Managing and Automating AWS Security with Python. Kubernetes - CKAD Application Developer. Kubernetes A...

AWS - Code Signer

Image
  AWS Lambda code signing is the practice of digitally signing source code packages for functions and layers. The goal of code signing is to ensure that only trusted code runs in your AWS Lambda functions. AWS Signer is a fully-managed code-signing service that can be used to verify the integrity of your AWS Lambda code. Before your code is deployed, AWS Lambda will perform a series of validation checks which will determine whether to accept or reject the deployment package. The first step in the code signing process is to define Amazon S3 source and destination buckets. AWS Signer retrieves unsigned packages from the S3 source bucket, performs the signing job on the package, then deposits the signed package in the S3 destination bucket. We create a S3 bucket with 2 folders. unsigned code  holds normal zip files. Creating a signing profile: Under profile, we mention the signing platform and validity period. Once the profile is created, "Start signing job". Here, we mention...

AWS Dynamodb Series - I

Image
  In this series, we will cover about AWS Dynamo DB. As the name suggests, its a database but NOSQL database. NOSQL means its not only SQL.  Dynamo DB can store structured and unstructure data. But the same must be in Key Value format (Dictionary format). Let' see how to create a table. Most important and must have in a dynamodb table is the "Partition or Primary Key".   Partition key is a common term used across any storage space. It is widely used for better query execution and better clubbing of data. With partition key, we can avoid scanning entire table and speed up the query exection. Dynamodb store the table data in partitions.  I selected “department” as the primary key. “student_name” as the sort key which is optional. Sort key, as the same says it is used in conjunction with the primary key to sort the items. I am going with "Default settings" and selecting Standard storage class. Selecting Read/Write capacity settings as "On-demand" . Not se...

DevOps Interview Q&A

Image
  1. How does GitLab trigger pipelines automatically when a developer pushes code?    Git triggers build the moment developer commits to the respective branch.    It works based on hook(push events). 2. How do you declare dependent stages in a CI/CD YAML file?  Use stages for ordering and needs for explicit dependencies. 3. What is terraform init? terraform init: Initializes the environment by setting up the backend, downloading providers, and modules. 4. What is backend.tf? backend.tf: Defines the backend configuration, which tells Terraform where to store the state file (local or remote). 5. What does terraform plan do? terraform plan essentially performs a "dry run" of the changes, allowing you to review what will happen before you apply them. 6. What happens if you give the wrong configuration or code in Terraform and run it? It depends. Syntax error will fail at the plan phase, else resources will get created.  If the resource already exist in sta...

AWS LB - QnA

Image
  ***AWS Load Balancer interview Question*** 1. What are the different types of Load Balancers provided by AWS? Classical Load Balancer - Deprecated. Application Load Balancer. Network Load Balancer. 2. When would you choose ALB over NLB or CLB? ALB - Primarily works in the Application Layer. Supports HTTP layer customization like path based forwarding, Host header, HTTP request method, Source IP based routing. NLB - Operates at Networking layer. Provide much better performance compared to ALB. NLB's target group can be an ALB. 3. How does path-based routing work in an Application Load Balancer? Path based routing allows to route traffic based on the request path. E.g., If your domain name is www.example.com, we can configure path based routing like www.example.com /welcome www.example.com /signin Path based traffic can be routed to a "Target Group", "Redirect to URL", "Return Fixed Response". 4. How does AWS Auto Scaling integrate with Elastic Load Ba...

Does Target Group Updates Instances Dynamically?

Image
  We all know what is a target group, it is a pool of EC2 instances. It sits between the load balancer and ASG. When you add EC2 instances to the target group manually which is registering and deregistering EC2 instance. But in real time, we don't register/deregister manually. For this we need to create an EMPTY TARGET GROUP and attach the load balancer and refer that load balancer to the ASG. I created an empty target group. Attached this a load balancer and associated the load balancer to the ASG. Now we have an EC2 instance created and it gets registered automatically with the target group. Let’s terminate the instance and ASG will replace the instance. This should also update the target group dynamically. Now, we can see a new instance created in ASG. i-06f8b560ea0a3bbaa  Instance ID should be updated in target group. We can see the new instance updated dynamically.