updated_devops_interview_questions
updated_devops_interview_questions
Q: Can you explain the key differences between EC2 and Lambda?
A: EC2 provides virtual machines that run continuously or when needed, allowing complete control
over the environment, while Lambda is serverless and only runs in response to events, charging
Q: What is the purpose of VPC in AWS, and how do subnets and route tables work within it?
A: A VPC (Virtual Private Cloud) allows you to create a private, isolated network within AWS.
Subnets divide the VPC into smaller networks, and route tables define the traffic flow between
A: To set up high availability, you can use ELB or ALB to distribute traffic across multiple instances
or availability zones, ensuring that if one instance fails, traffic is automatically routed to healthy
instances.
Q: Can you explain how CloudFormation works, and what its benefits are?
A: CloudFormation is an AWS service that enables you to provision and manage AWS resources
using templates written in JSON or YAML. The key benefits include automation, repeatability, and
A: IAM (Identity and Access Management) in AWS is used to define permissions and control access
to resources. You create users, groups, and roles with policies that define what actions are allowed
A: A use case could be automating the provisioning of a multi-tier architecture (like web servers,
databases, and networking) across multiple AWS accounts using Terraform for consistency and
repeatability.
Q: What strategies do you use to optimize cost when using EC2 and S3?
A: Cost optimization strategies include using EC2 Reserved Instances, Autoscaling to optimize
instance usage, and using S3 lifecycle policies to move data to cheaper storage classes like S3
Glacier.
A: Automated deployments using Jenkins pipelines involve defining stages (e.g., build, test, deploy)
in a Jenkinsfile, integrating with version control, and automating the execution of scripts for
A: Kubernetes ensures high availability using features like pod replication, automatic failover, and
load balancing through services, ensuring that applications are always up and running even if
A: In a blue-green deployment, you have two environments: one live (blue) and one idle (green).
You deploy to the green environment, test it, and switch traffic to it once its verified, minimizing
Q: What are security best practices for working with AWS services?
A: Best practices include using IAM roles with least privilege, enabling multi-factor authentication,
using encryption for sensitive data, and regularly auditing AWS CloudTrail logs for suspicious
activity.