2. EC2 Flashcards

1
Q

Question

A

Answer

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

What is EC2?

A

EC2 is a web service that provides resizable compute capacity in the cloud.

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

What are the EC2 instance types?

A

The EC2 instance types are:- On Demand- Reserved Instances- Spot Instances- Dedicated Host

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

When would you use on-demand EC2 instances?

A

On-demand EC2 instances are for users that want low cost and flexibility without any up-front payment or long term commitment. It is used for applications with short term workloads that cannot be interrupted. It is useful for applications being developed or tested on EC2 for the first time.

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

What are reserved instances useful for?

A

Reserved instances are useful for applications with stable load and predictable usage and so require reserved capacity. Users are able to make upfront payment to reduce costs even further.

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

What are the types of reserved instance?

A

The types of reserved instance are:- Standard reserved- Convertible reserved- Scheduled reserved

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

What are EC2 spot instances?

A

Spot instances are instances that are deployed when the cost is between pre-set parameters. Spot instances are useful for applications that can have flexible start and end times and applications that are only feasible at low compute prices.

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

What are EC2 Dedicated Hosts?

A

Dedicated hosts give you a fully dedicated physical server for your use, with complete control of Hardware and Software. Suitable for software with a complicated licensing model or strong regulatory/compliance needs.

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

What root volumes types are available for EC2 instances?

A

EC2 root volumes can only be SSD or magnetic standard. Other options such as HDD are only available when adding additional volumes.

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

What is a security group?

A

A ‚ÄØsecurity group‚ÄØ acts as a virtual firewall to control inbound and outbound traffic for your instance.They can be attached to many instances. An instance can also have many Security Groups.

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

How long does it take for security group changes to take effect?

A

Any security group changes take effect immediately.

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

Are security groups stateful or stateless?

A

Security groups are stateful — if you send a request from your instance, the response traffic for that request is allowed to flow in regardless of inbound security group rules. Responses to allowed inbound traffic are allowed to flow out, regardless of outbound rules.

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

Are Network Access Control Lists stateful or stateless?

A

Network Access Control Lists are stateless.

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

What is the difference between a Security Group and a Network access control list?

A

Security groups are tied to an instance whereas Network ACLs are tied to the subnet.

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

What would you use to block or blacklist certain ip addresses?

A

NACLS should be used to block or blacklist ip addresses

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

How are keys used to access EC2 instances?

A

You will set a public key that gets attached to the EC2 instance and use your private key to actually access. (public key = a padlock that you can put anywhere, private key = key to the padlock)

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

What is Termination Protection?

A

Termination Protection is ensuring that the root volume is not lost when the EC2 is deleted.Termination Protection is turned off by default.

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

What is ENI?

A

ENI is an Elastic Network Interface - essentially a virtual network card for your EC2 instance. An ENI is automatically attached when you create an EC2 instance.

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

What is an EN?

A

EN is Enhanced Networking.EN uses SR-IOV for high performance networking capabilities.

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

What is EFA (Elastic Fabric Adapter)?

A

Elastic Fabric Adapter is a network device that can be attached to an EC2 instance to accelerate HPC (High Performance Computing) and machine learning applications.

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

When would you use ENI?

A

You would use ENI for basic networking at low cost.All instance types have an ENI

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

When would you use ENA (Enhanced Network Adapter)?

A

You would use ENA when you need higher I/O performance and lower CPU utilisation than standard ENI adapters. ENA gives speeds between 10Gbps and 100Gbps - reliable, high throughput

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

When would you use EFA (Elastic Fabric Adapter) ?

A

You would use EFA when you need to accelerate HPC (High Performance Computing) and machine learning applications.

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

What is a Spot Block?

A

A Spot Block can be used to stop your Spot Instances from being terminated even if the price exceeds your maximum spot price. Spot blocks can be set for between one to six hours.

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

What are some specific examples of what Spot Instances useful for?

A

Spot Instances are useful for:- Big Data and Analytics- Containerised workloads- CI/CD testing- Web services- HPC- Image Rendering

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

What are Spot Instances not useful for?

A

Spot Instances are not useful for:- Persistent workloads- Critical workloads- Databases

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

Can you be charged for a partial hour of usage for a Spot Instance?

A

If the Spot instance is terminated by EC2 you will not be charged for a partial hour of usage.If you terminate the instance yourself then you will be charged for partial hours of usage.

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

What are the two types of Spot Instances?

A

The two types of Spot Instance are:- one-time- persistent

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

What are Spot Fleets?

A

A Spot Fleet is a collection of Spot Instances and, optionally, on-demand instances.So inside your Spot Fleet you can have on-demand instances as well as Spot Instances

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

What do Spot Fleets do?

A

A Spot Fleet attempts to launch the number of Spot Instances and On-Demand instances to meet the target capacity specified in the Spot Fleet request.

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

What do you use in order to enact your Spot Fleet strategies?

A

The definition of launch pools should be used to enact your Spot Fleet strategies of:- Capacity Optimised- Diversified- Lowest Price- Instance Pools To Use Count

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

To what in AWS can you access using access keys and secret access keys?

A

Access keys and secret access keys are used to access AWS via the command line or via API, but not via the console.

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

What does a credential report provide?

A

A credential report provides a download of all users in your account.It gives details such as the last use of passwords, when they need changing, whether it has an access key on the account, whether MFA has been enabled etc.

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

What are EC2 Placement Groups?

A

Placement groups are ways of grouping your EC2 instances together

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

What are the 3 types of Placement Groups?

A

The 3 types of Placement Groups are:- Clustered Placement Group- Spread Placement Group- Partitioned Placement Group

36
Q

What is a spread placement group?

A

A spread placement group is a group of instances that are each placed on distinct racks, with each rack having its own network and power source.It is used to minimise the risk of failure, as they are all in different hardware. It is used in critical applications that need high availability.

37
Q

What is a partition placement group?

A

A partition placement group divides each group of instances into logical partitions. Each partition is then put on to a separate rack for resilience.Between partitions, instances can fail simultaneously but would not fail in other partitions, as each rack has its network and power source. This strategy is typically used by large distributed and replicated workloads, such as Hadoop, Cassandra, and Kafka

38
Q

What is the difference between spread placement groups and partition placement groups?

A

In Spread placement groups you have single EC2 instances on individual racks, but with partition placement groups you have multiple EC2 instances on individual racks.

39
Q

What are the underlying hypervisors for EC2?

A

Xen and Nitro are the underlying hypervisors for EC2

40
Q

The use of a cluster placement group is ideal ___

A

A Cluster placement group is ideal if your fleet of EC2 instances requires high network throughput and low latency within a single availability zone.

41
Q

What type of storage is Amazon’s S3 based on?

A

Object-based

42
Q

Which service would you use to run a general Windows File Server with minimal overhead?

A

Amazon FSx for Windows File Server provides a fully managed native Microsoft Windows file system so you can easily move your Windows-based applications that require shared file storage to AWS.

43
Q

What IP Address will give you instance metadata or user data?

A

http://169.254.169.254 This IP Address is specific to AWS, where you can use it on any instance to acquire information about that instance.

44
Q

When can you attach/replace an IAM role on an EC2 instance?

A

IAM Roles can be attached to instances in the stopped or running state, or replaced for instances in the running state.

45
Q

What is a scenario for when you should choose ENI over EN and EFA?

A

You should choose ENI if you need basic networking at low cost for your instance.

46
Q

What is a scenario for when you should choose EN over ENI and EFA?

A

You should chose EN when you need speeds between 10Gbps and 100Gbps and need reliable and high throughput

47
Q

What is a scenario for when you should choose EFA over ENI and EN?

A

You should choose EFA when you are working with HPC (High Performance Computing) or Machine Learning systems.

48
Q

What are the types of Spot Instance requests?

A

Persistent and One-time are the types of Spot Instance requests available. If you choose persistent then the spot-instance will reload if the price goes below the maximum price set again

49
Q

Can you move an existing instance into a placement group?

A

You can move an existing instance into a placement group but the instance must be in the stopped state.

50
Q

Why would you select a Standard Reserved instance?

A

You would select a Standard Reserved instance to get a better price. It does mean however that you cannot upgrade the instance capacity.

51
Q

Why would you select a Convertible Reserved instance?

A

You would select a Convertible Reserved instance to give you the flexibility to upgrade the capacity if needed.

52
Q

Why would you select a Scheduled Reserved instance?

A

You would select a Scheduled Reserved instance is we knew we needed compute resource for scheduled times per week for example.

53
Q

What are Dedicated Instances?

A

Dedicated Instances are instances running on hardware dedicated to a single customer. Dedicated Instances may share hardware with other instances from the same AWS account.

54
Q

What is EC2 User Data used for?

A

EC2 User Data is used for automating the boot tasks such as:- Installing updates or software- Installing files from the internet- Whatever you want to do in the boot process.

55
Q

What are the ways to connect to a running EC2 instance?

A

Once we have created the instance, there are different ways to access it:- SSH (command line for Linux and Mac)- Putty (command line for Windows)- RDP for Windows- EC2 Instance Connect

56
Q

What is EC2 Instance Connect?

A

EC2 Instance Connect allows you to establish a connection to the EC2 through the browser without worrying about the key or anything. Instance Connect does not work if you block the SSH port in the EC2 instance.

57
Q

If a Security Group blocks traffic, is this logged?

A

Security Groups are outside EC2, so if you block traffic, this traffic will not be logged in EC2

58
Q

What is the issue likely to be if you get a Connection Timeout Error when attempting to connect to EC2?

A

If you get a Connection Timeout Error while accessing the instance, it will probably be an error with the Security Group

59
Q

How do you specify what traffic can enter and leave an instance?

A

You specify what traffic can enter and leave an instance using port numbers in the security group assigned.

60
Q

What is the relationship between security groups and instances?

A

Security Groups can be attached to many instances and an instance can also have many Security Groups.

61
Q

Do Security Groups or NACLs let you specify allow rules but not deny rules?

A

Security Groups allow you to specify allow but not deny rules.

62
Q

With regards to placement groups, what is a cluster?

A

A cluster is a logical grouping of instances within a single Availability Zone.Using a cluster gives low latency and so is useful for Big Data jobs that we must complete quickly, High-Performance Computing Applications, etc. This co-location does mean that if there is a hardware failure, all the instances will fail simultaneously.

63
Q

What is an Elastic IP used for?

A

When an EC2 instance re-starts it is assigned a new public IP. For that reason, Elastic IPs exist, which gives the instance a fixed public IP so that it does not change. The private IP is going to remain the same.

64
Q

What are Public and Private IPs used for?

A

A Public IP is used to identify a machine on the internet. It’s unique; two computers cannot have the same one.A Private IP is used to identify a machine on a private network. Unique IP in the private network.

65
Q

Which Amazon EC2 billing option gives you low cost, maximum flexibility, no upfront costs or commitment, and you only pay for what you use?

A

With On-Demand instances, you pay for hours used with no commitment. There are no upfront costs.

66
Q

Amazon EC2 instances run between 10 am and 6 pm Monday-Thursday in a development environment. Production instances run 24/7. Which pricing models should be used?

A

Use scheduled reserved instances for the development environment. Use Reserved instances for the production environment.Scheduled Instances are a good choice for workloads that do not run continuously but run on a regular schedule, so this is ideal for the development environment.Reserved instances are a good choice for workloads that run continuously. This is a good option for the production environment to save money compared to on-demand instances.

67
Q

You are planning to deploy several EC2 instances in your VPC. You will deploy the EC2 instances across several subnets and multiple AZs. What AWS feature can act as an instance-level firewall to control traffic between your EC2 instances?

A

Security groups act at the instance level, not the subnet level, controlling inbound and outbound traffic.

68
Q

A solutions architect is designing a web application that consists of a public-facing web tier hosted on Amazon EC2 in public subnets. The database tier consists of Microsoft SQL Server running on Amazon EC2 in a private subnet. Security is a high priority for the company. How should security groups be configured?

A

Configure the security group for the web tier to allow inbound traffic on port 443 from 0.0.0.0/0.Configure the security group for the database tier to allow inbound traffic on port 1433 from the security group for the web tier.An inbound rule is required to allow traffic from any internet client to the web front end, which you should set to 0.0.0.0/0. We should open port 443 to enable HTTPS.To secure the connection from the web frontend to the database tier, you should create an outbound rule from the public EC2 security group with a destination of the private EC2 security group, the port 1433 for MySQL, allowing only inbound traffic from the public EC2 security group. If a user tries to connect directly to the DB from the Internet without going through the EC2 instance, the Security Group will block access. We can see the diagram in the following image:

69
Q

How can a systems administrator specify a script run on an EC2 instance during launch?

A

User Data - When you launch an instance, you can pass user data to the instance that can be used to perform common automated configuration tasks and even run scripts after the instance starts.

70
Q

A High-Performance Computing (HPC) application which requires low network latency and high throughput between nodes, will be deployed in a single AZ. How should the application be deployed for the best inter-node performance?

A

A cluster placement group provides low latency and high throughput for instances deployed in a single AZ. Load Balancer Placement group doesn’t exist.

71
Q

If we have to ensure that the Amazon EC2 instances from an application can be launched in another AWS Region in the event of a disaster, what steps should be taken?

A

Create AMIs of the instances and copy them to another Region.Launch instances in the second Region from the AMIs.You can create AMIs of EC2 instances and then copy them across regions. Once they are in the second Region, you can launch the EC2 instances from the AMIs.

72
Q

What is the total number of EC2 instances you can have within a security group?

A

You can have any number of EC2 instances within a security group.

73
Q

How many security groups can you attach to an EC2 instance?

A

You can have multiple security groups attached to an EC2 instance.

74
Q

What are bootstrap scripts?

A

A bootstrap script is a script that runs when the instance first runs. aka user data

75
Q

What is Outposts?

A

Outposts brings the AWS data center directly to your on-premise location allowing you to have a variety of AWS services in your data center.

76
Q

What are the benefits of Outposts?

A

Outputs benefits include:- a hybrid Cloud model- fully managed infrastructure (by AWS)- consistency (on-premise and Cloud can be managed using the console)

77
Q

What are the types of Outposts?

A

The two types of Outposts are:- Outposts Rack- Outposts Servers

78
Q

What is the difference between Outposts Rack and Server?

A

Rack is for deployment in data centres and areas with large rack space. Servers is for small space requirements such as retail stores and branch offices.Rack is for large deployments, Server is for smaller deployments.

79
Q

What are the differences between Outposts Rack and Server in terms of services?

A

Rack provides compute, storage, database and other services locally. Server provides local compute and network services.

80
Q

What would you use to extend your private VMware Cloud to AWS?

A

You can use vCenter on the Cloud using VMware.

81
Q

Do placement groups span AZs?

A

Cluster placement groups can’t span AZs but spread and placement groups can

82
Q

What type of instances can be launched in a placement group?

A

The following can be launched in a placement group:- compute optimised- GPU- memory optimised- storage optimised

83
Q

Can you merge placement groups?

A

No placement groups cannot be merged

84
Q

Can you move existing instances into a placement group?

A

Yes you can move instances into placement groups but the instance needs to be in a state of ‘stopped’.

85
Q

How can you move instances into placement groups?

A

Currently you can only move instances into placement groups using the CLI or SDK only