Module 2: Introduction Flashcards

1
Q

What’s the purpose of EC2?

A

EC2 provides secure, resizable compute capacity in the cloud as Amazon EC2 instances.

In business, you’re going to need servers to power your business and your applications. You need raw compute capacity to host your applications and provide the compute power that your business needs.

When you’re working with AWS, those servers are virtual. And the service you use to gain access to virtual servers is called EC2.

Using EC2 for compute is highly flexible, cost effective, and quick when you compare it to running your own servers on premises in a data center that you own.

With EC2, it’s much easier to get started. AWS took care of the hard part for you already. AWS already built and secured the data centers. AWS has already bought the servers, racked and stacked them, and they are already online ready to be used. AWS is constantly operating a massive amount of compute capacity. And you can use whatever portion of that capacity when you need it. All you have to do is request the EC2 instances you want and they will launch and boot up, ready to be used within a few minutes. Once you’re done, you can easily stop or terminate the EC2 instances. You’re not locked in or stuck with servers that you don’t need or want. Your usage of EC2 instances can vary greatly over time. And you only pay for what you use. Because with EC2, you only pay for running instances, not stopped or terminated instances.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Whats EC2 stand for?

A

EC2 (Elastic Compute)
EC2 (Amazon Elastic Compute Cloud)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Define Raw compute capacity

A

Raw compute capacity refers to the fundamental processing power and resources needed to run computer applications and perform computations. It is essentially the ability of a computing system, typically a server or data center, to perform tasks and calculations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Define computations

A

“Computations” refer to the process of performing calculations, operations, or mathematical tasks using a computer or any programmable device. In the context of computing and technology, computations involve manipulating data or performing actions based on algorithms, mathematical formulas, or instructions provided by software programs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Define a virtual server

A

1) Think of a virtual server like a computer that exists only inside another computer. It’s a bit like having a special computer room inside your regular computer. This virtual computer can do its own tasks, like running programs and websites, but it lives inside your real computer and shares its resources, like memory and processing power. So, it’s like a computer inside a computer, but it acts on its own.

2)A virtual server is like having different imaginary friends inside a big toy box. Even though they all use the same toy box, each friend thinks they have their very own box with their own toys. They can play and do different things without bothering each other, even though it’s all in the same toy box. So, it’s like having lots of playmates in one big toy box, but they don’t mix up their toys.

3) Imagine a computer that can pretend to be many different computers at the same time. It’s like having one amazing costume that can turn into lots of different characters. These pretend computers can all use the same real computer’s powers, like its brain and storage space, but they act like they have their own brains and can do their own things. It’s like having a supercomputer that can do many jobs all at once by pretending to be different computers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is an instance?

A

An instance is a virtual server in the AWS Cloud.
With Amazon EC2, you can set up and configure the operating system and applications that run on your instance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Whats a multitenancy?

A

EC2 runs on top of physical host machines managed by AWS using virtualization technology. When you spin up an EC2 instance, you aren’t necessarily taking an entire host to yourself. Instead, you are sharing the host with multiple other instances, otherwise known as virtual machines. And a hypervisor running on the host machine is responsible for sharing the underlying physical resources between the virtual machines. This idea of sharing underlying hardware is called multitenancy. The hypervisor is responsible for coordinating this multitenancy and it is managed by AWS. The hypervisor is responsible for isolating the virtual machines from each other as they share resources from the host. This means EC2 instances are secure. Even though they may be sharing resources, one EC2 instance is not aware of any other EC2 instances also on that host. They are secure and separate from each other.

Luckily, this is not something you, yourself, need to set up. But it’s important to know the idea of multitenancy and have a high level understanding of how this works. EC2 gives you a great deal of flexibility and control. Not only can you spin up new servers or take them offline at will, but you also have the flexibility and control over the configuration of those instances.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Traditionally, how did people go about to have servers powering their systems?

A

With traditional on-premises resources, you have to do the following:

. Spend money upfront to purchase hardware.
. Wait for the servers to be delivered to you.
. Install the servers in your physical data center.
. Make all the necessary configurations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How does Amazon EC2 instance better compared to the traditional way?

A

With Amazon EC2 instance you can use a virtual server to run applications in the AWS Cloud.

. You can provision and launch an Amazon EC2 instance within minutes.
. You can stop using it when you have finished running a workload.
. You pay only for the compute time you use when an instance is running, not when it is stopped or terminated.
. You can save costs by paying only for server capacity that you need or want.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Amazon EC2 instance types

A

Amazon EC2 instance types are optimized for different tasks. When selecting an instance type, consider the specific needs of your workloads and applications. This might include requirements for compute, memory, or storage capabilities.

. General purpose instances
. Compute optimized instances
. Memory optimized instances
. Accelerated computing instances
. Storage optimized instances
. Knowledge check

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Amazon EC2 instance types:

  1. General purpose instances
A

General purpose instances provide a balance of compute, memory, and networking resources. You can use them for a variety of workloads, such as:

. application servers
. servers
. backend servers for enterprise applications
. small and medium databases

Suppose that you have an application in which the resource needs for compute, memory, and networking are roughly equivalent. You might consider running it on a general purpose instance because the application does not require optimization in any single resource area.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Amazon EC2 instance types:

  1. Compute optimized instances
A

Compute optimized instances are ideal for compute-bound applications that benefit from high-performance processors. Like general purpose instances, you can use compute optimized instances for workloads such as web, application, and gaming servers.

However, the difference is compute optimized applications are ideal for high-performance web servers, compute-intensive applications servers, and dedicated gaming servers. You can also use compute optimized instances for batch processing workloads that require processing many transactions in a single group.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Amazon EC2 instance types:

  1. Memory optimized instances
A

Memory optimized instances are designed to deliver fast performance for workloads that process large datasets in memory. In computing, memory is a temporary storage area. It holds all the data and instructions that a central processing unit (CPU) needs to be able to complete actions. Before a computer program or application is able to run, it is loaded from storage into memory. This preloading process gives the CPU direct access to the computer program.

Suppose that you have a workload that requires large amounts of data to be preloaded before running an application. This scenario might be a high-performance database or a workload that involves performing real-time processing of a large amount of unstructured data. In these types of use cases, consider using a memory optimized instance. Memory optimized instances enable you to run workloads with high memory needs and receive great performance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Amazon EC2 instance types:

  1. Accelerated computing instances
A


Accelerated computing instances use hardware accelerators, or coprocessors, to perform some functions more efficiently than is possible in software running on CPUs. Examples of these functions include floating-point number calculations, graphics processing, and data pattern matching.

In computing, a hardware accelerator is a component that can expedite data processing. Accelerated computing instances are ideal for workloads such as graphics applications, game streaming, and application streaming.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Amazon EC2 instance types:

  1. Storage optimized instances
A

Storage optimized instances are designed for workloads that require high, sequential read and write access to large datasets on local storage. Examples of workloads suitable for storage optimized instances include distributed file systems, data warehousing applications, and high-frequency online transaction processing (OLTP) systems.

In computing, the term input/output operations per second (IOPS) is a metric that measures the performance of a storage device. It indicates how many different input or output operations a device can perform in one second. Storage optimized instances are designed to deliver tens of thousands of low-latency, random IOPS to applications.

You can think of input operations as data put into a system, such as records entered into a database. An output operation is data generated by a server. An example of output might be the analytics performed on the records in a database. If you have an application that has a high IOPS requirement, a storage optimized instance can provide better performance over other instance types not optimized for this kind of use case.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

knowledge check quiz

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q
A

What are Amazon EC2 pricing?

With Amazon EC2, you pay only for the compute time that you use. Amazon EC2 offers a variety of pricing options for different use cases.

. On-Demand
. Amazon EC2 Savings Plans
. Reserved Instances
. Spot Instances
. Dedicated Hosts
. Knowledge check

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What are Amazon EC2 pricing?

  1. On-Demand
A

On-Demand Instances are ideal for short-term, irregular workloads that cannot be interrupted. No upfront costs or minimum contracts apply. The instances run continuously until you stop them, and you pay for only the compute time you use.

Sample use cases for On-Demand Instances include developing and testing applications and running applications that have unpredictable usage patterns. On-Demand Instances are not recommended for workloads that last a year or longer because these workloads can experience greater cost savings using Reserved Instances.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

knowledge check quiz

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What are Amazon EC2 pricing?

  1. Reserved Instances
A

Reserved Instances are a billing discount applied to the use of On-Demand Instances in your account.

There are two available types of Reserved Instances:

  1. Standard Reserved Instances
  2. Convertible Reserved Instances

You can purchase Standard Reserved and Convertible Reserved Instances for a 1-year or 3-year term. You realize greater cost savings with the 3-year option.

Standard Reserved Instances: This option is a good fit if you know the EC2 instance type and size you need for your steady-state applications and in which AWS Region you plan to run them. Reserved Instances require you to state the following qualifications:

Instance type and size: For example, m5.xlarge
Platform description (operating system): For example, Microsoft Windows Server or Red Hat Enterprise Linux
Tenancy: Default tenancy or dedicated tenancy
You have the option to specify an Availability Zone for your EC2 Reserved Instances. If you make this specification, you get EC2 capacity reservation. This ensures that your desired amount of EC2 instances will be available when you need them.

Convertible Reserved Instances: If you need to run your EC2 instances in different Availability Zones or different instance types, then Convertible Reserved Instances might be right for you. Note: You trade in a deeper discount when you require flexibility to run your EC2 instances.

At the end of a Reserved Instance term, you can continue using the Amazon EC2 instance without interruption. However, you are charged On-Demand rates until you do one of the following:

Terminate the instance.
Purchase a new Reserved Instance that matches the instance attributes (instance family and size, Region, platform, and tenancy).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What are Amazon EC2 pricing?

  1. EC2 Instance Savings Plans
A

AWS offers Savings Plans for a few compute services, including Amazon EC2. EC2 Instance Savings Plans reduce your EC2 instance costs when you make an hourly spend commitment to an instance family and Region for a 1-year or 3-year term. This term commitment results in savings of up to 72 percent compared to On-Demand rates. Any usage up to the commitment is charged at the discounted Savings Plans rate (for example, $10 per hour). Any usage beyond the commitment is charged at regular On-Demand rates.

The EC2 Instance Savings Plans are a good option if you need flexibility in your Amazon EC2 usage over the duration of the commitment term. You have the benefit of saving costs on running any EC2 instance within an EC2 instance family in a chosen Region (for example, M5 usage in N. Virginia) regardless of Availability Zone, instance size, OS, or tenancy. The savings with EC2 Instance Savings Plans are similar to the savings provided by Standard Reserved Instances.

Unlike Reserved Instances, however, you don’t need to specify up front what EC2 instance type and size (for example, m5.xlarge), OS, and tenancy to get a discount. Further, you don’t need to commit to a certain number of EC2 instances over a 1-year or 3-year term. Additionally, the EC2 Instance Savings Plans don’t include an EC2 capacity reservation option.

Later in this course, you’ll review AWS Cost Explorer, which you can use to visualize, understand, and manage your AWS costs and usage over time. If you’re considering your options for Savings Plans, you can use AWS Cost Explorer to analyze your Amazon EC2 usage over the past 7, 30, or 60 days. AWS Cost Explorer also provides customized recommendations for Savings Plans. These recommendations estimate how much you could save on your monthly Amazon EC2 costs, based on previous Amazon EC2 usage and the hourly commitment amount in a 1-year or 3-year Savings Plan.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What are Amazon EC2 pricing?

  1. Spot Instances
A

Spot Instances are ideal for workloads with flexible start and end times, or that can withstand interruptions. Spot Instances use unused Amazon EC2 computing capacity and offer you cost savings at up to 90% off of On-Demand prices.

Suppose that you have a background processing job that can start and stop as needed (such as the data processing job for a customer survey). You want to start and stop the processing job without affecting the overall operations of your business. If you make a Spot request and Amazon EC2 capacity is available, your Spot Instance launches. However, if you make a Spot request and Amazon EC2 capacity is unavailable, the request is not successful until capacity becomes available. The unavailable capacity might delay the launch of your background processing job.

After you have launched a Spot Instance, if capacity is no longer available or demand for Spot Instances increases, your instance may be interrupted. This might not pose any issues for your background processing job. However, in the earlier example of developing and testing applications, you would most likely want to avoid unexpected interruptions. Therefore, choose a different EC2 instance type that is ideal for those tasks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What are Amazon EC2 pricing?

  1. Dedicated Hosts
A

Dedicated Hosts are physical servers with Amazon EC2 instance capacity that is fully dedicated to your use.

You can use your existing per-socket, per-core, or per-VM software licenses to help maintain license compliance. You can purchase On-Demand Dedicated Hosts and Dedicated Hosts Reservations. Of all the Amazon EC2 options that were covered, Dedicated Hosts are the most expensive.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What is the difference between Amazon EC2 Savings Plans and Spot Instances?

A

Amazon EC2 Savings Plans:
. Amazon EC2 Savings Plans are ideal for workloads that involve a consistent amount of compute usage over a 1-year or 3-year term.

With Amazon EC2 Savings Plans, you can reduce your compute costs by up to 72% over On-Demand costs.

Spot Instances?

. Spot Instances are ideal for workloads with flexible start and end times, or that can withstand interruptions. With Spot Instances, you can reduce your compute costs by up to 90% over On-Demand costs.

Unlike Amazon EC2 Savings Plans, Spot Instances do not require contracts or a commitment to a consistent amount of compute usage.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

What is scalability?

A

Scalability involves beginning with only the resources you need and designing your architecture to automatically respond to changing demand by scaling out or in. As a result, you pay for only the resources you use. You don’t have to worry about a lack of computing capacity to meet your customers’ needs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

What is the purpose of Amazon EC2 Auto Scaling?

A

If you wanted the scaling process to happen automatically, which AWS service would you use? The AWS service that provides this functionality for Amazon EC2 instances is Amazon EC2 Auto Scaling.

Amazon EC2 Auto Scaling enables you to automatically add or remove Amazon EC2 instances in response to changing application demand. By automatically scaling your instances in and out as needed, you can maintain a greater sense of application availability.

Within Amazon EC2 Auto Scaling, you can use two approaches: dynamic scaling and predictive scaling.

  • Dynamic scaling responds to changing demand.
  • Predictive scaling automatically schedules the right number of Amazon EC2 instances based on predicted demand.

To scale faster, you can use dynamic scaling and predictive scaling together.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

Questions

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

Whats the necessity of Amazon EC2 Auto Scaling?

A

It adds instances based on demand and then decommissions instances when they are no longer needed. This means that every minute of the day, you always have the correct number of instances. Happy customers. Happy CFO. Happy architecture.

29
Q

What is computing power in the cloud?

A

In the cloud, computing power is a programmatic resource, so you can take a more flexible approach to the issue of scaling. By adding Amazon EC2 Auto Scaling to an application, you can add new instances to the application when necessary and terminate them when no longer needed.

30
Q

What’s a minimum capacity of one Amazon EC2 instance?

A
  • The MINIMUM CAPACITY is the number of Amazon EC2 instances that launch immediately after you have created the Auto Scaling group. In this example, the Auto Scaling group has a minimum capacity of one Amazon EC2 instance.

Suppose that you are preparing to launch an application on Amazon EC2 instances. When configuring the size of your Auto Scaling group, you might set the minimum number of Amazon EC2 instances at one. This means that at all times, there must be at least one Amazon EC2 instance running.

  • Next, you can set the DESIRED CAPACITY at two Amazon EC2 instances even though your application needs a minimum of a single Amazon EC2 instance to run.

If you do not specify the desired number of Amazon EC2 instances in an Auto Scaling group, the desired capacity defaults to your minimum capacity.

  • The third configuration that you can set in an Auto Scaling group is the MAXIMUM CAPACITY. For example, you might configure the Auto Scaling group to scale out in response to increased demand, but only to a maximum of four Amazon EC2 instances.

Because Amazon EC2 Auto Scaling uses Amazon EC2 instances, you pay for only the instances you use, when you use them. You now have a cost-effective architecture that provides the best customer experience while reducing expenses.

31
Q

How can you ensure there’s an even distribution of workload across EC2 instances? So not just one is backed up while the others are idle sitting by.

A

You need a way to route requests to instances to process that request. What you need to solve this is called load balancing.

32
Q

What’s a load balancer?

A

A load balancer is an application that takes in requests and routes them to the instances to be processed.

Now, there are many off the shelf load balancers that work great on AWS. And if you have a favorite flavor that already does exactly what you want, then feel free to keep using it. In which case it will be up to your operations team to install, manage, update, scale, handle fail over, and availability. It’s doable.

Odds are what you really need is just to properly distribute traffic in a high performance, cost-efficient, highly available, automatically scalable system that you can just set and forget.

33
Q

Define Elastic Load Balancing

A

Elastic Load Balancing is the AWS service that automatically distributes incoming application traffic across multiple resources, such as Amazon EC2 instances.

A load balancer acts as a single point of contact for all incoming web traffic to your Auto Scaling group. This means that as you add or remove Amazon EC2 instances in response to the amount of incoming traffic, these requests route to the load balancer first. Then, the requests spread across multiple resources that will handle them. For example, if you have multiple Amazon EC2 instances, Elastic Load Balancing distributes the workload across the multiple instances so that no single instance has to carry the bulk of it.

Although Elastic Load Balancing and Amazon EC2 Auto Scaling are separate services, they work together to help ensure that applications running in Amazon EC2 can provide high performance and availability.

34
Q

What’s Elastic Load Balancing, or ELB?

A

Elastic Load Balancing, or ELB, is engineered to address the undifferentiated heavy lifting of load balancing.

  • Elastic Load Balancing is a regional construct, because it runs at the Region level rather than on individual EC2 instances, the service is automatically highly available with no additional effort on your part.

ELB is automatically scalable. As your traffic grows, ELB is designed to handle the additional throughput with no change to the hourly cost. When your EC2 fleet auto-scales out, as each instance comes online, the auto-scaling service just lets the Elastic Load Balancing service know that it’s ready to handle the traffic, and off it goes. Once the fleet scales in, ELB first stops all new traffic, and waits for the existing requests to complete, to drain out. Once they do that, then the auto-scaling engine can terminate the instances without disruption to existing customers.

35
Q

Is Elastic Load Balancing (ELB) only used for external traffic?

A

ELB is not only used for external traffic. Let’s look at the ordering tier, and how it communicates with the production tier. Right now, each front end instance is aware of each backend instance. And if a new back end instance comes online, in this current architecture, it would have to tell every front end instance that it can now accept traffic. This is complicated enough with just half a dozen instances. Now imagine you have potentially hundreds of instances on both tiers. Each tier shifting constantly based on demand. Just keeping them networked efficiently is impossible.

Well, we solve the back end traffic chaos with an ELB as well. Because ELB is regional, it’s a single URL that each front end instance uses. Then the ELB directs traffic to the back end that has the least outstanding requests. Now, if the back end scales, once the new instance is ready, it just tells the ELB that it can take traffic, and it gets to work. The front end doesn’t know and doesn’t care how many back end instances are running. This is true decoupled architecture.

36
Q

Why would we compare the registers as Amazon EC2 instances?

A

Low-demand period

Here’s an example of how Elastic Load Balancing works. Suppose that a few customers have come to the coffee shop and are ready to place their orders.

If only a few registers are open, this matches the demand of customers who need service. The coffee shop is less likely to have open registers with no customers. In this example, you can think of the registers as Amazon EC2 instances.

37
Q

Why would we compare a coffee shop employee to a load balancer?

A

High-demand period

Throughout the day, as the number of customers increases, the coffee shop opens more registers to accommodate them.

Additionally, a coffee shop employee directs customers to the most appropriate register so that the number of requests can evenly distribute across the open registers. You can think of this coffee shop employee as a load balancer.

38
Q

What is messaging and queuing?

A

This idea of placing messages into a buffer is called messaging and queuing. Just as our cashier sends orders to the barista, applications send messages to each other to communicate. If applications communicate directly like our cashier and barista previously, this is called being tightly coupled.

  • You can see how this is a flawed process, because as soon as either the cashier or barista is out of sync, the process will degrade, causing slow downs in receiving orders and failures to complete orders at all. A much better process would be to introduce some sort of buffer or queue into the system. Instead of handing the order directly to the barista, the cashier would post the order to some sort of buffer, like an order board.
39
Q

What is a tightly coupled architecture?

A

A hallmark trait of a tightly coupled architecture is where if a single component fails or changes, it causes issues for other components or even the whole system. For example, if we have Application A and it is sending messages directly to Application B, if Application B has a failure and cannot accept those messages, Application A will begin to see errors as well. This is a tightly coupled architecture.

40
Q

Why is a more reliable architecture is loosely coupled?

A

A more reliable architecture is loosely coupled. This is an architecture where if one component fails, it is isolated and therefore won’t cause cascading failures throughout the whole system. If we coded the application to use a more loosely coupled architecture, it could look as follows.

Just like our cashier and barista, we introduced a buffer between the two. In this case, we introduced a message queue. Messages are sent into the queue by Application A and they are processed by Application B. If Application B fails, Application A doesn’t experience any disruption. Messages being sent can still be sent to the queue and will remain there until they are eventually processed.

This is loosely coupled. This is what we strive to achieve with architectures on AWS. And this brings me to two AWS services that can assist in this regard.

41
Q

Define Amazon Simple Queue Service ( Amazon SQS )

A

Amazon SQS allows you to send, store, and receive messages between software components at any volume. This is without losing messages or requiring other services to be available. Think of messages as our coffee orders and the order board as an SQS queue. Messages have the person’s name, coffee order, and time they ordered. The data contained within a message is called a payload, and it’s protected until delivery. SQS queues are where messages are placed until they are processed. And AWS manages the underlying infrastructure for you to host those queues. These scale automatically, are reliable, and are easy to configure and use.

42
Q

Define Amazon Simple Notification Service or SNS (Amazon SNS) ?

A

Amazon SNS is similar in that it is used to send out messages to services, but it can also send out notifications to end users. It does this in a different way called a publish/subscribe or pub/sub model. This means that you can create something called an SNS topic which is just a channel for messages to be delivered. You then configure subscribers to that topic and finally publish messages for those subscribers. In practice, that means you can send one message to a topic which will then fan out to all the subscribers in a single go. These subscribers can also be endpoints such as SQS queues, AWS Lambda functions, and HTTPS or HTTP web hooks.

Additionally, SNS can be used to fan out notifications to end users using mobile push, SMS, and email. Taking this back to our coffee shop, we could send out a notification when a customer’s order is ready. This could be a simple SMS to let them know to pick it up or even a mobile push.

In fact, it looks like my phone just received a message. Looks like my order is ready. See you soon.

43
Q

What is a monolithic application as a type of architecture?

A

Applications are made of multiple components. The components communicate with each other to transmit data, fulfill requests, and keep the application running.

Suppose that you have an application with tightly coupled components. These components might include databases, servers, the user interface, business logic, and so on.

In this approach to application architecture, if a single component fails, other components fail, and possibly the entire application fails.

To help maintain application availability when a single component fails, you can design your application through a microservices approach.

44
Q

Describe the microservices approach as a type of architecture

A

In a microservices approach, application components are loosely coupled. In this case, if a single component fails, the other components continue to work because they are communicating with each other. The loose coupling prevents the entire application from failing.

When designing applications on AWS, you can take a microservices approach with services and components that fulfill different functions. Two services facilitate application integration: Amazon Simple Notification Service (Amazon SNS) and Amazon Simple Queue Service (Amazon SQS).

45
Q

Describe Amazon Simple Notification Service (Amazon SNS)

A

Amazon Simple Notification Service (Amazon SNS) is a publish/subscribe service. Using Amazon SNS topics, a publisher publishes messages to subscribers. This is similar to the coffee shop; the cashier provides coffee orders to the barista who makes the drinks.

In Amazon SNS, subscribers can be web servers, email addresses, AWS Lambda functions, or several other options.

46
Q

In Amazon SNS, subscribers to articles can be…

A

In Amazon SNS, subscribers can be web servers, email addresses, AWS Lambda functions, or several other options.

47
Q

What does EC2 require of you? What are you responsible for?

A

That being said, though EC2 is incredibly flexible, reliable, and scalable, depending on your use case, you might be looking at alternatives for your compute capacity.

EC2 requires that you set up and manage your fleet of instances over time.

When you’re using EC2, you are responsible for patching your instances when new software packages come out, setting up the scaling of those instances as well as ensuring that you’ve architected your solutions to be hosted in a highly available manner. This is still not as much management as you would have if you hosted these on-premises. But management processes will still need to be in place.

48
Q

AWS offers multiple serverless compute options. Serveless means…

A

Serverless means that you cannot actually see or access the underlying infrastructure or instances that are hosting your application. Instead, all the management of the underlying environment from a provisioning, scaling, high availability, and maintenance perspective are taken care of for you. All you need to do is focus on your application and the rest is taken care of.

The term “serverless” means that your code runs on servers, but you do not need to provision or manage these servers. With serverless computing, you can focus more on innovating new products and features instead of maintaining servers.

Another benefit of serverless computing is the flexibility to scale serverless applications automatically. Serverless computing can adjust the applications’ capacity by modifying the units of consumptions, such as throughput and memory.

Comparison between computing with virtual servers (thinking about servers and code) and serverless computing (thinking only about code).

49
Q

What should you do if you weren’t quite ready for serverless yet or you need access to the underlying environment, but still want efficiency and portability?

A

You should look at AWS container services like Amazon Elastic Container Service, otherwise known as ECS. Or Amazon Elastic Kubernetes Service, otherwise known as EKS.

50
Q

Whats a container?

A

A container is a package for your code where you package up your application, its dependencies as well as any configurations that it needs to run. These containers run on top of EC2 instances and run in isolation from each other similar to how virtual machines work.

51
Q

Can you name 2 container orchestration tools?

A

2 AWS container services :

  • Amazon Elastic Container Service, otherwise known as ECS.
  • Amazon Elastic Kubernetes Service, otherwise known as EKS.
52
Q

Where do container orchestration tools run?

A

Both of these services are container orchestration tools, but before I get too far here, a container in this case is a Docker container. Docker is a widely used platform that uses operating system level virtualization to deliver software in containers. Now a container is a package for your code where you package up your application, its dependencies as well as any configurations that it needs to run.

These containers run on top of EC2 instances and run in isolation from each other similar to how virtual machines work. But in this case, the host is an EC2 instance. When you use Docker containers on AWS, you need processes to start, stop, restart, and monitor containers running across not just one EC2 instance, but a number of them together which is called a cluster.

53
Q

Define the process called container orchestration

A

The process of doing these tasks is called container orchestration and it turns out it’s really hard to do on your own. Orchestration tools were created to help you manage your containers.

ECS is designed to help you run your containerized applications at scale without the hassle of managing your own container orchestration software. EKS does a similar thing, but uses different tooling and with different features.

54
Q

Can Both Amazon ECS and Amazon EKS run on top of EC2?

A

Both Amazon ECS and Amazon EKS can run on top of EC2. But if you don’t want to even think about using EC2s to host your containers because you either don’t need access to the underlying OS or you don’t want to manage those EC2 instances, you can use a compute platform called AWS Fargate. Fargate is a serverless compute platform for ECS or EKS.

55
Q

What to choose, EC2, AWS Lambda, Docker ?

A

If you are trying to host traditional applications and want full access to the underlying operating system like Linux or Windows, you are going to want to use EC2. If you are looking to host short running functions, service-oriented or event driven applications and you don’t want to manage the underlying environment at all, look into the serverless AWS Lambda. If you are looking to run Docker container-based workloads on AWS, you first need to choose your orchestration tool. Do you want to use Amazon ECS or Amazon EKS? After you choose your tool, you then need to chose your platform. Do you want to run your containers on EC2 instances that you manage or in a serverless environment like AWS Fargate that is managed for you?

56
Q

If you have applications that you want to run in Amazon EC2, you must…

A
  • Provision instances (virtual servers).
  • Upload your code.
  • Continue to manage the instances while your application is running.
57
Q

The term “serverless” means

A

that your code runs on servers, but you do not need to provision or manage these servers.

58
Q

What are the benefits of serverless computing?

A
  • You can focus more on innovating new products and features instead of maintaining servers.
  • The flexibility to scale serverless applications automatically. Serverless computing can adjust the applications’ capacity by modifying the units of consumptions, such as throughput and memory.

Comparison between computing with virtual servers (thinking about servers and code) and serverless computing (thinking only about code).

59
Q

Describe AWS Lambda

A

An AWS service for serverless computing is AWS Lambda.

AWS Lambda(opens in a new tab) is a service that lets you run code without needing to provision or manage servers.

While using AWS Lambda, you pay only for the compute time that you consume. Charges apply only when your code is running. You can also run code for virtually any type of application or backend service, all with zero administration.

For example, a simple Lambda function might involve automatically resizing uploaded images to the AWS Cloud. In this case, the function triggers when uploading a new image.

60
Q

How AWS Lambda works

A
  • You upload your code to Lambda.
  • You set your code to trigger from an event source, such as AWS services, mobile applications, or HTTP endpoints.
  • Lambda runs your code only when triggered.

You pay only for the compute time that you use. In the previous example of resizing images, you would pay only for the compute time that you use when uploading new images. Uploading the images triggers Lambda to run code for the image resizing function.

61
Q

Define containers

A

Containers

Containers provide you with a standard way to package your application’s code and dependencies into a single object. You can also use containers for processes and workflows in which there are essential requirements for security, reliability, and scalability.

62
Q

What is the benefit of Container orchestration services?

A

Container orchestration services help you to deploy, manage, and scale your containerized applications. Next, you will learn about two services that provide container orchestration: Amazon Elastic Container Service and Amazon Elastic Kubernetes Service.

63
Q

Why would a developper use a containerized approach?

A

When a developer wants to ensure that the application’s environment remains consistent regardless of deployment, they use a containerized approach. This helps to reduce time spent debugging applications and diagnosing differences in computing environments.

64
Q

Define Amazon Elastic Container Service (Amazon ECS)

A

Amazon Elastic Container Service (Amazon ECS)(opens in a new tab) is a highly scalable, high-performance container management system that enables you to run and scale containerized applications on AWS.

65
Q

Define Docker

A

Docker(opens in a new tab) is a software platform that enables you to build, test, and deploy applications quickly.

Amazon ECS supports Docker containers. AWS supports the use of open-source Docker Community Edition and subscription-based Docker Enterprise Edition. With Amazon ECS, you can use API calls to launch and stop Docker-enabled applications.

66
Q

Define Amazon Elastic Kubernetes Service (Amazon EKS)

A

Amazon Elastic Kubernetes Service (Amazon EKS)(opens in a new tab) is a fully managed service that you can use to run Kubernetes on AWS.

67
Q

Define Kubernetes

A

Kubernetes(opens in a new tab) is open-source software that enables you to deploy and manage containerized applications at scale.

A large community of volunteers maintains Kubernetes, and AWS actively works together with the Kubernetes community. As new features and functionalities release for Kubernetes applications, you can easily apply these updates to your applications managed by Amazon EKS.

68
Q

Define AWS Fargate

A

AWS Fargate(opens in a new tab) is a serverless compute engine for containers. It works with both Amazon ECS and Amazon EKS.

When using AWS Fargate, you do not need to provision or manage servers. AWS Fargate manages your server infrastructure for you. You can focus more on innovating and developing your applications, and you pay only for the resources that are required to run your containers.

69
Q

Consider reading the following websites

A

https://explore.skillbuilder.aws/learn/course/134/play/85854/aws-cloud-practitioner-essentials