EC2 Flashcards

This deck aims to help retain concepts related to the AWS EC2 service.

1
Q

What AWS service provides secure, scalable compute capacity in the cloud?

A

AWS Elastic Compute Cloud (EC2)

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

What is the resiliency posture of EC2 service?

A

EC2 is an Availability Zone-resilient service

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

Can an EC2 instance be connected to ENI, or EBS volume, which exists in different Availability Zones?

A

No, they must be in the same Availability Zone

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

What events might cause an EC2 instance to be moved to a different EC2 host?

A
  1. The host is down for maintenance by AWS
  2. The instance is restarted (stopped and started again)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are some common use cases for EC2 instances?

A

Usually the default choice for most cases (or a good starting point)
1. Traditional services (OS + App)
2. Long-running compute (months/years 24/7)
3. Server-style applications (burst, steady-state)
4. Monolithic applications
5. Application migration from on-prem
6. Disaster recovery

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

What are the different types of EC2 hosts?

A

Shared Host (default)
Dedicated Instance
Dedicated Host

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

Name the EC2 host type where the physical server is shared with other customer instances.

A

Shared Host (default)

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

Name the EC2 host type where the instance can be moved to a different physical server.

A

Dedicated Instance

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

Name the EC2 host type where the physical server does not change.

A

Dedicated Host

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

What are the different types of EC2 instances?

A

General Purpose (default)
Compute Optimized
Memory Optimized
Accelerated Computing
Storage Optimized
HPC Optimized

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

Why does AWS offer so many different EC2 instance types?

A

Instance types consist of various combinations of CPU, memory, storage, and networking capacity, allowing the selection of the most appropriate mix of resources for the use case

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

Which EC2 instance type would be appropriate for diverse workloads that require an equal resource ratio?

A

General Purpose (default)
A1, M6g, T3, T3a, M5, M5a, M5n

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

Which EC2 instance type would be appropriate for media processing, high-performance computing (HPC), science modelling, gaming, or machine learning workloads?

A

Compute Optimized
C5, C5n

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

Which EC2 instance type would be appropriate for processing large in-memory datasets, or database workloads?

A

Memory Optimized
R5, R5a, X1, X1e, u-Xtb1, z1d

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

List the most popular EC2 instance families for the General Purpose instance type.

A

A1, M6g: Graviton, Graviton 2, arm-based processors
T3, T3a: Burst pools, normal usage with occasional peaks
M5, M5a, M5n: steady-state workloads (Intel/AMD arch)

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

Which EC2 instance type would be appropriate for Hardware GPU, or field programmable gate arrays (FPGAs) workloads?

A

Accelerated Computing
P3, G4, F1, Inf1

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

Which EC2 instance type would be appropriate for sequential and random IO, transactional database scaling, data warehousing, elastic search, and analytics workloads?

A

Storage Optimized
I3/I3en, D2, H1

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

Decode the following instance type: r5d.8xlarge

A

r - instance family
5 - instance generation
d - instance additional features
8xlarge - instance size

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

Which EC2 instance type would be appropriate for applications such as large, complex simulations and deep learning workloads?

A

HPC Optimized

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

List the most popular EC2 instance families for the Compute Optimised instance type.

A

C5, C5n: media encoding, scientific modelling, gaming, machine learning

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

List the most popular EC2 instance families for the Memory Optimised instance type.

A

R5, R5a: real-time analytics, in-memory cache, in-memory operations
X1, X1e: large-scale in-memory applications, lowest $/GiB memory in AWS
u-Xtb1: highest memory of all AWS instances
z1d: large memory and CPU with directly attached NVMe

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

List the most popular EC2 instance families for the Accelerated Computing instance type.

A

P3: GPU instances (Tesla v100 GPUs) for parallel processing and machine learning
G4: GPU instances (NVIDIA T4 Tensor) for graphic intensive and machine learning
F1: field programming gate arrays (FPGA) genomic, financial analysis, big data
Inf1: machine learning, recommendation, forecasting, analysis, voice, conversation

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

List the most popular EC2 instance families for the Storage Optimised instance type

A

I3/I3en: local high-performance SSD (NVMe), NoSQL databases, warehousing, analytics
D2: Dense Storage (HDD) - data warehousing, HADOOP, distributed file systems, data processing (lowest price disk throughput)
H1: high throughput, balance CPU/Memory, HDFS, MAPR-FS, file systems, apache Kafka, big data

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

What is the difference between the following PUBLIC EC2 connection methods: Client SSH and EC2 Instance Connect?

A
  • Client SSH: requires an SSH key and the connection must originate from the client’s (your) IP address
  • EC2 Instance Connect: does not require an SSH key, uses IAM to determine permissions, and the connection originates from an AWS IP address
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Name a vital network component designed to provide high-level network performance and security for EC2 instances.

A

Elastic Network Interface (ENI)

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

How many ENIs does an EC2 instance have by default?

A

One primary ENI

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

Is it possible to attach more than one ENI to an EC2 instance?

A

Yes, EC2 instances can have secondary ENIs attached (depending on the instance type), these ENIs can be in different subnets but must be in the same Availability Zone

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

Is it possible to detach an ENI from an EC2 instance?

A

Secondary ENIs can be detached from one EC2 instance and attached to another, however, the primary ENI cannot be detached

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

List the main components of an ENI.

A

MAC address
1 primary private IPv4 address
0 or more secondary private IPv4 addresses
0 or 1 IPv4 public address (optional)
1 or more Elastic IPs (one per private IPv4 address, optional)
0 or more IPv6 addresses (by default, publicly routable)
Security group attachment
Source/destination check (disable for instances used as NAT)

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

What is the purpose of the EC2 source and destination check feature?

A

When enabled, the EC2 instance must be the source or the destination of the traffic that reaches it or leaves it

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

Can an Elastic IP be associated with a secondary ENI on an EC2 instance?

A

Yes, an Elastic IP is allocated to the AWS account and can be associated with a private IPv4 address on either the primary or secondary ENI

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

Once the Elastic IP association is removed from the primary ENI on the EC2 instance, will the ENI get the previously replaced dynamic IPv4 address back?

A

No, the original dynamic IP will be replaced with a new dynamic IPv4 address

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

Once an Elastic IP is associated with the primary ENI on the EC2 instance, what happens to the dynamic public IPv4 address of that instance?

A

The dynamic public IPv4 address on the EC2 instance will be replaced with the Elastic IP address

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

Why would you use multiple ENIs over multiple IP addresses with one ENI?

A

Multiple ENIs can be used for a multi-homed (multi-subnet) architecture, one for management and one for data, as Security Groups attached to ENIs this approach provides an additional layer of security

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

Is the operating system of the EC2 instance aware of its public IPv4 address?

A

The operating system of the EC2 instance is not aware of its public IPv4 address; the Internet Gateway (IGW) performs address translation

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

Do public IPv4 addresses on EC2 instances persist through instance restarts (start/stop)?

A

Public IPv4 addresses are dynamic and do not persist through instance restarts, to achieve persistence for a public IPv4 address, you should use an Elastic IP (a static public IPv4 address)

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

How is an AWS EC2 instance’s private DNS name resolved?

A

A private DNS name is resolvable only within the VPC

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

Name a special type of virtual appliance that represents a template (or image) of an AWS EC2 instance configuration and is used to create one or more EC2 instances.

A

Amazon Machine Image (AMI)

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

How is an AWS EC2 instance’s public DNS name resolved within the VPC and outside of the VPC?

A

Within the VPC, the public DNS name resolves to a private IP address, outside of the VPC, it resolves to a public IP address

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

Is it possible to create an AMI from an existing EC2 instance?

A

Yes, it is common practice to create an AMI from an existing EC2 instance to capture its current configuration

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

Can an AMI created in one region be used to launch an AWS EC2 instance in another region?

A

AMIs are regional and can only be used in the region where they reside, however, they can be copied to another region (each AMI has a unique ID)

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

What types of launch permissions do AMIs have?

A
  • Public: permissions granted to all AWS accounts
  • Explicit: permissions granted to specific AWS accounts
  • Implicit: permissions granted to the owner of the AWS account (default)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

What are the different types of AMIs available in AWS?

A
  • AWS AMIs
  • Community-provided AMIs
  • Marketplace AMIs (which can include commercial software)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

What are the steps in the AMI lifecycle?

A
  1. Launch: using the AMI to initially launch the EC2 instance
  2. Configure: installing software, attaching volumes, and applying configurations
  3. Create AMI: creating a custom AMI from a pre-configured EC2 instance
  4. Launch: launching an EC2 instance using the new AMI with installed software and attached volumes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

Can you create an AMI from a running AWS EC2 instance?

A

Yes, but it is better practice to create the AMI when the instance is stopped to avoid consistency issues

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

What happens to EBS volumes during AMI creation from the EC2 instance?

A

Snapshots of EBS volumes are created along with the block device mapping

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

What happens to EBS volumes when a new AWS EC2 instance is launched from an AMI containing EBS volume snapshots and block device mapping?

A

EBS volumes will be created from the snapshots and attached to the EC2 instance in the launching AZ

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

What does AMI baking mean?

A

AMI baking refers to configuring an EC2 instance and creating an AMI from it

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

Can an AMI be edited?

A

An AMI cannot be edited directly, instead, you can launch an EC2 instance using the current AMI, make adjustments, and then create a new AMI from the modified instance

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

What types of automated checks do EC2 instances perform to identify hardware and software issues?

A
  • System Status Check: Detects issues with the underlying hardware, network connectivity, or host software.
  • Instance Status Check: Detects issues with the instance’s operating system, file system, or instance networking
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
42
Q

Which type of status check indicates loss of power, network connection issues, host software, and hardware issues?

A

System Status Check

43
Q

What type of status check indicates a corrupted file system, incorrect instance networking, OS, and kernel issues?

A

Instance Status Check

43
Q

What AWS EC2 purchase options are available?

A
  • On-Demand Instances
  • Reserved Instances
  • Spot Instances
  • Dedicated Instances
  • Dedicated Hosts
  • Savings Plans
  • Capacity Reservations
44
Q

What types of exam questions may include ENI and MAC address-related context?

A

Questions related to licensing

45
Q

Which type of EC2 purchase option represents isolated instances that share underlying hardware (host) with multiple customers?

A

On-Demand Instances (default purchase option)

46
Q

What factors should you consider when evaluating the On-Demand Instances EC2 purchase option?

A
  • No interruption
  • No capacity reservation
  • No upfront costs (per second billing)
  • No discounts
46
Q

What are the use cases for the On-Demand Instances EC2 purchase option?

A
  • Short-term workloads
  • Unknown workloads (to be evaluated)
  • Workloads that cannot tolerate interruption
47
Q

What type of EC2 purchase option sells EC2 host capacity at up to a 90% discount, based on spare capacity at a given time?

A

Spot Instances (cheapest purchase option)

48
Q

What factors should you consider when evaluating the Spot Instances EC2 purchase option?

A
  • The most cost-effective option (spot price)
  • Can be interrupted at any time
49
Q

What are the use cases for the Spot Instances EC2 purchase option?

A
  • Non-time-critical workloads
  • HPC workloads
  • Bursty capacity workloads
  • Cost-sensitive workloads
  • Stateless workloads
  • Workloads that can tolerate interruption
50
Q

What type of EC2 purchase option provides a billing discount that applies to the usage of On-Demand Instances in your account, when you commit to using a specific instance type for a one or three-year period?

A

Reserved Instances (RI)

50
Q

What factors should you consider when evaluating the Reserved Instances EC2 purchase option?

A
  • Reservation for 1 or 3 years
  • Unused reservations are still billed
  • Partial coverage of large instances
51
Q

What are the use cases for the Reserved Instances EC2 purchase option?

A
  • Known workloads
  • Workloads with consistent compute access
  • Workloads that cannot tolerate interruption
52
Q

What pricing model does the Reserved Instances EC2 purchase option have?

A
  • No upfront (per second cost, least discount)
  • Partial upfront (reduces per second cost, middle-ground discount)
  • All upfront (no per second costs, greater discount up to 72%)
53
Q

What type of EC2 purchase option provides scheduled capacity reservation?

A

Scheduled Reserved Instances (deprecated)

54
Q

What factors should you consider when evaluating the Scheduled Reserved Instances EC2 purchase option?

A
  • Capacity is reserved for a particular time window (daily, weekly)
  • Minimum of 1,200 hours per year purchase
  • At least one year of usage
55
Q

What are the use cases for the Scheduled Reserved Instances EC2 purchase option?

A

Ideal for workloads that require long-term usage and don’t run constantly

56
Q

Which type of EC2 purchase option represents isolated instances where no other customers use the same hardware and no host capacity management is required from the customer?

A

Dedicated Instances

56
Q

What factors should you consider when evaluating the Dedicated Instances EC2 purchase option?

A

Hardware is not shared with other customers

56
Q

What are the use cases for the Dedicated Instances EC2 purchase option?

A

Workloads that must not share underlying infrastructure (compliance)

57
Q

What pricing model does the Dedicated Instances EC2 purchase option have?

A

Pay an hourly fee for every region regardless of instance amount, and a fee for each instance

58
Q

Which type of EC2 purchase option represents isolated hosts allocated entirely to the customer, where the customer manages host capacity?

A

Dedicated Hosts

59
Q

What factors should you consider when evaluating the Dedicated Host EC2 purchase option?

A
  • Host-affinity (instances are linked to a certain host)
  • Requires capacity management (underutilization/overconsumption)
60
Q

What are the use cases for the Dedicated Host EC2 purchase option?

A

Used for applications that require licensed software based on sockets/cores (physical machine resources)

61
Q

What pricing model does the Dedicated Host EC2 purchase option have?

A

Per-hour pricing for the host (not the instance)

62
Q

What type of EC2 purchase option enables reservation of capacity for EC2 instances in a specific Availability Zone (AZ) for any duration?

A

Capacity Reservation

63
Q

Are Reserved Instances and Capacity Reservation mutually exclusive EC2 purchase options?

A
  • Reserved Instances are the billing component
  • Capacity Reservation is the capacity component

Both components can be used in combination (providing flexibility to selectively add capacity reservations and still get the regional RI discounts for that usage) or individually

64
Q

What are the priority orders for delivering compute capacity by AWS?

A
  1. Deliver reserved capacity requests
  2. Deliver on-demand requests
  3. Deliver leftover capacity to spot requests
65
Q

What type of EC2 purchase option represents a pricing model that offers discounted prices on regular On-Demand Instances (up to 72%) when you commit to one or three years?

A

Savings Plans

66
Q

What types of Savings Plans are there?

A
  • Compute Savings Plans (EC2, Fargate, Lambda) up to 66% discount
  • EC2 Instance Savings Plans (EC2) up to 72% discount
  • SageMaker Savings Plans (SageMaker instances) up to 64% discount
67
Q

Guess the EC2 purchase option:
- Requires a 1 or 3-year commitment
- Provides a discount for instances in any AZ of the region
- No capacity reservation (capacity priority is the same as on-demand)
- The default limit is 20 instances per region (can request a limit increase)

A

Regional Reserved Instances (RI)

68
Q

Question: Guess the EC2 purchase option:
- Requires a 1 or 3-year commitment
- Provides billing discount
- Beyond commitment, the on-demand pricing model is used
- Flexible discounts (Compute 66%, EC2 72%, SageMaker 64%)
- Provides no capacity reservation and no limits

A

Savings Plans

68
Q

Guess the EC2 purchase option:
- Requires a 1 or 3-year commitment
- Provides a discount for instances in a specific AZ
- Provides capacity reservation for a specific AZ
- The default limit is 20 instances per AZ (can request a limit increase)

A

Zonal Reserved Instances (RI)

68
Q

Guess the EC2 purchase option:
- No upfront commitment is required (can be created and cancelled as needed)
- No billing discount
- Instances can be launched in a specific AZ
- Provides capacity reservation for a specific AZ
- On-demand instance limits per region apply

A

Capacity Reservation

69
Q

Which EC2 feature can recover an instance when its status check fails?

A

EC2 Automatic Recovery

70
Q

Does the EC2 Automatic Recovery feature work with both system and instance checks?

A

Automatic recovery can recover an EC2 instance that fails a System Check (usually hardware-related issues) but cannot recover an instance that fails an instance check

71
Q

How can EC2 Termination Protection be configured?

A

It can be configured in instance settings with the attribute name disableApiTermination

71
Q

Which EC2 feature prevents an instance from being terminated while a specific flag is enabled?

A

EC2 Termination Protection

71
Q

What is a common use case for the EC2 Termination Protection feature?

A

Role separation (one group of users may have the ability to add or remove EC2 Termination Protection for crucial workloads protection, while another group of users can have the ability to terminate instances)

72
Q

What information does the EC2 Instance Metadata service provide?

A

It provides data about the instance such as hostname, instance ID, maintenance events, spot instance action, environment, networking, authentication, user data, and more

73
Q

What address is used to access the EC2 Instance Metadata service?

A

http://169.254.169.254/latest/meta-data

74
Q

Which type of scaling aims to add additional nodes or machines to your infrastructure to cope with new demands?

A

Horizontal Scaling

75
Q

What factors should be considered when implementing Horizontal Scaling?

A
  • Increases the number of particular instance types
  • Each instance runs the same application
  • The load balancer is required
  • Application modifications might be required (off-host sessions)
  • No downtime or disruption
  • No cap or limit
  • Often less expensive
  • Offers more granularity (smaller instances mean more granularity)
76
Q

Which type of scaling aims to add additional resources to a system so that it meets demand?

A

Vertical Scaling

77
Q

What factors should be considered when implementing Vertical Scaling?

A
  • Increase the size of a particular instance (t3.xlarge -> t3.2xlarge)
  • Each resize requires a reboot (disruption/downtime)
  • There is an upper cap on performance (maximum instance size)
  • Significant price increases
  • No application modifications are required
  • Works for all applications (including monoliths)
78
Q

When are the scripts provided in User Data to an EC2 instance executed?

A

During the initial instance launch using root privileges (only once)

79
Q

Which EC2 feature allows the automation of tasks during the instance bootstrapping process and is used to install software, apply configurations, and perform setup tasks?

A

User Data

80
Q

Where can User Data execution logs be found on the EC2 instance?

A

Execution results on Linux-based instances can be found in /var/log/cloud-init-output.log

81
Q

Is EC2 User Data available to the instance?

A

Yes, it is available at http://169.254.169.254/latest/user-data

82
Q

Is passing sensitive data to the EC2 instance through User Data secure?

A

No, it is not secure, User Data should not be used for long-term credentials

83
Q

Are there any size limits for the EC2 User Data feature?

A

User Data is limited to 16KB in size, but larger configuration scripts can be downloaded and executed as part of User Data

84
Q

Can User Data be modified if the EC2 instance is already running?

A

No, User Data can be modified when the instance is stopped, but the content is still executed only once during the initial launch

85
Q

What is the best practice: to use AMI to bake EC2 instance configuration into the image or to provide EC2 instance configuration through User Data?

A

The optimal solution is to use AMI baking for time-intensive parts of the process, such as software installation, and use User Data for parts that require flexibility, such as configuration

86
Q

Which EC2 component acts as a container for the IAM role, passing role information to the instance when it starts?

A

Instance Profile

87
Q

How are temporary credentials delivered to the EC2 instance?

A

Temporary credentials are delivered via instance metadata, they are automatically rotated and always valid

88
Q

Can applications running on the EC2 instance access credentials provided via the Instance Profile?

A

Yes, applications and CLI tools will automatically use credentials provided via the Instance Profile

89
Q

How can the EC2 instance access information about the role provided by the Instance Profile?

A

By accessing http://169.254.169.254/latest/meta-data/iam/security-credentials/<role-name></role-name>

90
Q

Which EC2 feature provides dedicated bandwidth for storage networking, separate from data networking?

A

EBS Optimization

91
Q

Which EC2 feature provides higher bandwidth, higher packet per second (PPS) performance, and consistently lower inter-instance latencies?

A

Enhanced Networking

91
Q

How can the EBS Optimization feature be enabled on the EC2 instance?

A

This feature is supported and enabled by default on most instance types without an additional charge, but some older instances might support it but may incur an additional charge for enabling it

92
Q

How is the Enhanced Networking EC2 feature implemented?

A

Utilizing the Single Root IO Virtualization (SR-IOV) standard, which allows a physical host network card to present many logical devices directly accessible and utilized by instances, providing higher IO, lower host CPU usage, more bandwidth, higher PPS, and consistently low latency (it is available on most instance types without an additional charge)

93
Q

What factors should be considered when considering the Dedicated Host EC2 purchase option?

A
  • There are no charges for the instance, only for the host
  • It can be purchased on-demand or reserved (1 or 3 years)
  • The host hardware has a certain number of physical sockets and cores
  • Hosts can be shared with other Organization Accounts through the Resource Access Manager (RAM)
  • It is used for applications that require physical core/socket licensing
94
Q

What limitations should be considered when purchasing the Dedicated Host EC2 option?

A
  • RHEL, SUSE, and Windows AMIs are not supported
  • RDS instances are not supported
  • Placement groups are not supported
  • It is designed for specific instance families only
94
Q

How can the EC2 instance internal system-level metric collection be enabled with CloudWatch?

A

Data inside the instance is opaque to CloudWatch unless the CloudWatch Agent is installed, the EC2 instance should also have a role with CloudWatch access permissions

95
Q

How can the CloudWatch Agent be installed on the EC2 instance?

A

Using the OS package manager:
$ sudo dnf install amazon-cloudwatch-agent
$ sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-config-wizard

96
Q

Once the CloudWatch Agent is installed on the EC2 instance, is any configuration required?

A

Yes, the configuration file is stored in /opt/aws/amazon-cloudwatch-agent/bin/config.json, or it can optionally be stored in the SSM Parameter Store, each log group must be configured for each log file on the instance, and each log stream will appear for each EC2 instance

97
Q

What EC2 feature allows you to impact the placement of interdependent EC2 instance groups to suit your workload requirements?

A

Placement Groups

98
Q

Which Placement Strategies are provided by the Placement Groups EC2 feature?

A
  • Cluster Placement Strategy
  • Partition Placement Strategy
  • Spread Placement Strategy
99
Q

Which Placement Strategy is used to achieve the best throughput and lowest possible latency, packing instances inside the same AZ?

A

Cluster Placement Strategy

100
Q

What factors should be considered for the Cluster Placement Strategy?

A
  • Instances are placed in the same rack, sometimes on the same host
  • Provides 10Gbps stream vs the usual 5Gbps
  • Offers the lowest latency and highest packets per second
  • Provides little to no resilience
  • Limited to one AZ only
  • Requires supported instance types
  • Preferably use the same instance type and launch all together
101
Q

For which use case is the Cluster Placement Strategy best suited?

A

Workloads with high performance, fast speed, and low latency requirements, such as HPC workloads

102
Q

Which Placement Strategy is used to group instances in separate logical partitions that form a placement group, so that each partition is built on top of separate hardware racks, avoiding common hardware failures?

A

Partition Placement Strategy

103
Q

What factors should be considered for the Partition Placement Strategy?

A
  • You can choose partitions explicitly
  • There is no limit on instances per AZ
  • It is limited to 7 partitions per AZ
104
Q

For which use case is the Partition Placement Strategy best suited?

A

Workloads with topology awareness requirements, large groups of instances (more than 7 per AZ), large-scale parallel-processing workloads, HDFS, Base, Cassandra

105
Q

Which Placement Strategy is used to launch EC2 instances on separate physical hardware, so that each of these instances will reside on a different rack with its own network and power access?

A

Spread Placement Strategy

106
Q

What factors should be considered for the Spread Placement Strategy?

A
  • Provides infrastructure isolation
  • Limited to 7 instances per AZ
  • Dedicated Instances and Dedicated Hosts are not supported
107
Q

For which use case is the Spread Placement Strategy best suited?

A

Workloads with resilience requirements and a small number of instances that need to be separated from each other