You are on page 1of 36

Module-1

By- Shyam
Cloud computing with AWS
• Amazon Web Services (AWS) is the world’s most comprehensive and
broadly adopted cloud, offering over 200 fully featured services from
data centers globally.
• Millions of customers—including the fastest-growing startups, largest
enterprises, and leading government agencies—are using AWS to
lower costs, become more agile, and innovate faster.
Amazon Web Services (AWS)
Compute Services:

• Amazon EC2 (Elastic Compute Cloud): Provides scalable computing capacity in the
cloud.
• AWS Lambda: Lets you run code without provisioning or managing servers. It's a
serverless compute service.
Storage Services:

• Amazon S3 (Simple Storage Service): Object storage built to store and retrieve any
amount of data.
• Amazon EBS (Elastic Block Store): Provides block-level storage volumes for use with
EC2 instances.
Amazon Web Services (AWS)
Database Services:
• Amazon RDS (Relational Database Service): Managed relational database
service supporting multiple database engines like MySQL, PostgreSQL, etc.
• Amazon DynamoDB: Fully managed NoSQL database service.
Networking Services:
• Amazon VPC (Virtual Private Cloud): Allows you to provision a logically
isolated section of the AWS cloud.
• Amazon Route 53: Scalable DNS (Domain Name System) web service.
Amazon Web Services (AWS)
Security and Identity Services:
• AWS IAM (Identity and Access Management): Helps securely control access to
AWS services and resources.
• Amazon Cognito: Provides authentication, authorization, and user
management for web and mobile apps.
Management Tools:
• AWS CloudFormation: Automates the deployment of infrastructure as code.
• AWS CloudWatch: Provides monitoring for AWS resources and applications.
Amazon Web Services (AWS)
Developer Tools:
• AWS CodeCommit: Git-based source control service.
• AWS CodeDeploy: Automates code deployments to EC2 instances, Lambda
functions, etc.
Analytics Services:
• Amazon Redshift: Fully managed data warehouse service.
• Amazon Athena: Interactive query service to analyze data stored in S3 using
standard SQL.
Amazon Web Services (AWS)
Machine Learning Services:

• Amazon SageMaker: Fully managed service that enables developers and data
scientists to quickly build, train, and deploy machine learning models at scale.
• Amazon Rekognition: Deep learning-based image and video analysis service.
Internet of Things (IoT) Services:
• AWS IoT Core: Managed cloud service that lets connected devices easily and
securely interact with cloud applications and other devices.
Amazon Web Services (AWS)
Artificial Intelligence Services:
• Amazon Polly: Text-to-speech service.
• Amazon Lex: Conversational interfaces for applications using voice and text.

Blockchain Services:
• Amazon Managed Blockchain: Managed service for creating and managing
scalable blockchain networks.
Amazon Virtual Private Cloud (VPC)
Amazon Virtual Private Cloud (VPC) is a foundational networking service provided by AWS
that allows you to create a virtual network in the cloud. VPC enables you to launch AWS
resources, such as EC2 instances, within a logically isolated section of the AWS cloud.
Here's an overview of VPC and its key features:
Isolated Virtual Network:
• VPC provides a logically isolated section of the AWS cloud where you can
launch AWS resources. It acts as your private network in the cloud.
Controlled Environment:
• You have complete control over your VPC, including selection of IP address
range, creation of subnets, configuration of route tables, and deployment of
network gateways.
Amazon Virtual Private Cloud (VPC)
Subnets:
• Within a VPC, you can create multiple subnets, each residing in a different
Availability Zone (AZ).
• Subnets allow you to segment your VPC into smaller networks to control
traffic flow and isolate resources.

Internet Gateway (IGW):


• An Internet Gateway enables communication between instances in your VPC
and the internet.
• It allows outbound internet access from instances in public subnets and
enables inbound internet access if associated with a public subnet.
Amazon Virtual Private Cloud (VPC)
Route Tables:
• Route tables control the routing of network traffic within your VPC.
• You can define routes for traffic destined for the internet, other VPCs, or
virtual private networks (VPNs).

Security Groups:
• Security groups act as virtual firewalls for your instances, controlling inbound
and outbound traffic.
• You can assign security groups to instances to specify which traffic is allowed
to reach them.
Amazon Virtual Private Cloud (VPC)
Network Access Control Lists (NACLs):
• NACLs are stateless firewalls that control traffic at the subnet level.
• They provide an additional layer of security by allowing or denying traffic
based on rules defined at the subnet level.
VPN Connections:
• VPC allows you to establish secure connections between your on-premises
data center and your VPC using virtual private network (VPN) connections.
• This enables hybrid cloud scenarios where you can extend your on-premises
network to the AWS cloud.
Amazon Virtual Private Cloud (VPC)
VPC Peering:
• VPC peering enables you to connect multiple VPCs within the same AWS region and route
traffic between them.
• This allows for secure communication between resources in different VPCs without the need
for internet gateways, VPN connections, or additional hardware.
Elastic Network Interfaces (ENIs):
• ENIs are virtual network interfaces that can be attached to instances in your VPC.
• They enable instances to communicate with each other and with other AWS services.
Flow Logs:
• VPC Flow Logs capture information about the IP traffic going to and from network interfaces
in your VPC.
• You can use Flow Logs for monitoring, troubleshooting, and security analysis of your network
traffic.
Amazon ElastiCache
Amazon ElastiCache is a serverless, Redis- and Memcached-compatible
caching service delivering real-time, cost-optimized performance for
modern applications. ElastiCache scales to hundreds of millions of
operations per second with microsecond response times, and offers
enterprise-grade security and reliability.
Amazon ElastiCache
Terraform
• Terraform is an open-source infrastructure as code (IaC) tool
developed by HashiCorp.
• It enables users to define and provision infrastructure using a
declarative configuration language.
• Terraform allows you to manage and automate the deployment of
infrastructure resources across various cloud providers, including
AWS, Azure, Google Cloud Platform, and others, as well as on-
premises environments.
Terraform
Key features and concepts of Terraform include:
Declarative Configuration Language:
• Terraform uses a declarative configuration language called HashiCorp
Configuration Language (HCL) to define infrastructure resources and their
configurations.
Infrastructure as Code (IaC):
• With Terraform, infrastructure is defined as code, allowing for versioning,
collaboration, and reuse of infrastructure configurations.
• This approach enables predictable and repeatable provisioning of
infrastructure resources.
Terraform
Provider Plugins:
• Terraform supports a wide range of cloud providers and other infrastructure
platforms through provider plugins.
• Each provider plugin allows Terraform to interact with the API of the
respective platform to create, update, and manage resources.
Resource Graph:
• Terraform builds a dependency graph based on the declared resources and
their relationships in the configuration files.
• This resource graph helps Terraform determine the order in which resources
should be provisioned or modified.
Terraform
Execution Plans:
• Before making any changes to infrastructure, Terraform generates an execution
plan that outlines the actions it will take (e.g., create, update, delete resources).
• Users can review the execution plan to understand the impact of the proposed
changes before applying them.
State Management:
• Terraform maintains a state file that records the current state of the managed
infrastructure.
• The state file is used to track the mapping between real-world resources and the
resources defined in Terraform configuration, enabling Terraform to manage
resources effectively.
Terraform
Modularity and Reusability:
• Terraform configurations can be organized into reusable modules, allowing for modularity and
abstraction of infrastructure components.
• Modules can be shared and reused across projects, promoting best practices and standardization.
Integration with CI/CD Pipelines:
• Terraform integrates with continuous integration and continuous delivery (CI/CD) pipelines,
enabling automated testing and deployment of infrastructure changes.
• This facilitates infrastructure automation and accelerates the development lifecycle.
Community and Ecosystem:
• Terraform has a large and active community that contributes modules, plugins, and best
practices.
• The Terraform Registry provides a centralized repository for discovering and sharing Terraform
modules, providers, and other resources.
Apache JMeter
Apache JMeter is a popular open-source tool used for performance
testing, load testing, and stress testing web applications. While JMeter
itself is not specifically designed for cloud-based testing, it can be used
in conjunction with AWS to conduct performance testing on cloud-
based applications.
We can leverage JMeter for cloud performance testing on AWS:
• Deploy Application Under Test (AUT) on AWS:
• First, deploy your web application or service on AWS. This could be an EC2
instance hosting your application, an ECS cluster running Docker containers,
or any other AWS service where your application resides.
Apache JMeter

Set Up JMeter:
• Install JMeter on your local machine or a server. JMeter is a Java-based application, so
ensure that Java is installed.
• Download the latest version of JMeter from the Apache JMeter website:
https://jmeter.apache.org/download_jmeter.cgi

Create Test Plan in JMeter:


• Launch JMeter and create a new test plan.
• Define your test scenarios, including HTTP requests, samplers, assertions, timers, and
listeners.
• Configure thread groups to simulate user loads and define ramp-up periods and loop counts.
Apache JMeter
Configure AWS Resources:
• Set up necessary AWS resources such as EC2 instances, RDS databases, S3
buckets, etc., if your application relies on them.
Execute Test Plan:
• Run your test plan in JMeter to simulate various load scenarios and measure
the performance of your application.
• Monitor various performance metrics such as response times, throughput,
error rates, etc., using JMeter listeners.
Configure AWS Resources:
• Set up necessary AWS resources such as EC2 instances, RDS databases, S3
buckets, etc., if your application relies on them.
Apache JMeter

Execute Test Plan:


• Run your test plan in JMeter to simulate various load scenarios and measure the performance of your
application.
• Monitor various performance metrics such as response times, throughput, error rates, etc., using JMeter
listeners.
Monitor AWS Resources:
• Utilize AWS CloudWatch to monitor the performance of AWS resources such as EC2 instances, RDS
databases, etc., during the test.
• Monitor CPU utilization, memory usage, network throughput, and other relevant metrics to ensure that
AWS resources are handling the load effectively.
Analyze Test Results:
• Analyze the test results generated by JMeter to identify performance bottlenecks, scalability issues, and
areas for optimization in your application.
• Use JMeter's reporting capabilities or export test results to other formats for further analysis and sharing.
Apache JMeter
Scale AWS Resources (Optional):
• Based on the test results, scale AWS resources as needed to handle increased
load and improve performance.
• Use AWS Auto Scaling to automatically adjust the number of EC2 instances or
other resources based on demand.
Repeat and Iterate:
• Iterate on your test plan, making adjustments as needed based on test results
and feedback, and repeat the performance testing process to validate
improvements.
CloudWatch
Amazon CloudWatch is a monitoring and observability service provided
by AWS that allows users to collect and track metrics, collect and
monitor log files, set alarms, and automatically react to changes in AWS
resources. It provides insights into the performance and operational
health of your AWS infrastructure and applications.
• CloudWatch key features:
CloudWatch
CloudWatch key features:
Metrics:
• CloudWatch collects and stores metrics, which are data points associated with
your AWS resources and the performance of those resources.
• AWS services automatically send metrics to CloudWatch, and you can also
publish custom metrics using the CloudWatch API.
Dashboards:
• CloudWatch Dashboards allow you to create customizable dashboards to
visualize metrics and monitor the health of your AWS resources in real-time.
• You can add widgets to dashboards to display metrics, logs, alarms, and other
relevant information.
CloudWatch
Alarms:
• CloudWatch Alarms allow you to set thresholds on metrics and trigger actions
when those thresholds are breached.
• You can create alarms to notify you via Amazon SNS (Simple Notification
Service), Amazon EC2 Auto Scaling, or AWS Lambda when a metric exceeds
a specified threshold.
Logs:
• CloudWatch Logs allows you to collect, monitor, and store log files from your
AWS resources and applications.
• You can search and filter log data, create metric filters to extract custom
metrics from log events, and create alarms based on log data.
CloudWatch
Events:
• CloudWatch Events provides a stream of system events that describe changes
in your AWS environment.
• You can use CloudWatch Events to trigger automated actions in response to
events, such as invoking AWS Lambda functions, running AWS Step
Functions, or sending messages to Amazon SNS topics.
Insights:
• CloudWatch Logs Insights is a feature that allows you to interactively search
and analyze log data stored in CloudWatch Logs.
• You can run queries to extract insights, identify patterns, and troubleshoot
issues within your log data.
CloudWatch
Synthetics:
• CloudWatch Synthetics allows you to monitor the availability and latency of your web
applications by running synthetic HTTP requests and recording performance metrics.
• You can create canaries (scripts that simulate user interactions) to monitor endpoints and detect
issues before they impact end-users.
Contributors Insights:
• CloudWatch Contributor Insights provides visibility into the top contributors driving resource
utilization within your AWS environment.
• It helps identify the most impactful sources of resource usage and optimize performance and costs
accordingly.
Anomaly Detection:
• CloudWatch Anomaly Detection analyzes historical metrics data to automatically detect anomalies
and unusual behavior in your metrics.
• It helps you identify performance deviations and potential issues proactively.
Locust
• Locust is an open-source load testing tool written in Python. It allows you to
define user behavior using Python code, making it highly flexible and
customizable. Locust supports distributed load testing, meaning you can run tests
using multiple nodes to generate higher loads and simulate realistic user behavior.
Here's how you can utilize Locust for distributed load testing in AWS:
Setting Up Locust:
• Install Locust on your local machine or a server where you plan to run your
load test.
• You can install Locust using pip, the Python package manager:
Locust
Writing Locust Scripts:
• Define your load test scenarios using Python code in Locust scripts.
• Specify the user behavior, including tasks, user behavior patterns, and any necessary
logic for your test scenarios.
Distributed Load Testing:
• Locust supports distributed load testing, allowing you to run tests across multiple
nodes to simulate higher loads.
• Set up multiple instances of Locust (locust master and locust workers) on different
machines or EC2 instances in AWS.
Configuring Locust Master:
• Run one instance of Locust as the master node.
• Start the Locust master using the following command.
Locust
Configuring Locust Workers:
• Run one or more instances of Locust as worker nodes.
• Start the Locust workers using the following command:
• locust -f your_locust_script.py --worker --master-
host=<IP_ADDRESS_OF_MASTER>
• Replace <IP_ADDRESS_OF_MASTER> with the IP address of the Locust
master node.
Monitoring and Reporting:
• Monitor the progress of your load test using the Locust web interface or
command-line interface.
• Locust provides real-time statistics on request rates, response times, failures,
and other metrics.
Locust
Auto-Scaling with AWS:
• Utilize AWS Auto Scaling to automatically scale the number of EC2 instances running
Locust workers based on demand.
• Configure Auto Scaling policies to adjust the number of instances based on metrics such as
CPU utilization or request rates.
Analyzing Results:
• After the load test completes, analyze the results to identify performance bottlenecks,
measure response times, and evaluate the scalability of your application.
• Locust provides built-in reporting tools and integrations with third-party tools for result
analysis.
Scaling Infrastructure:
• Based on the test results, scale your AWS infrastructure as needed to handle the expected
load and optimize performance.
Amazon Web Services (AWS) - LABS
Thank you 

You might also like