AWS Fundamentals Flashcards

1
Q

Public vs Private Services

A
  • Public or Private Service - NETWORKING PERSPECTIVE

A public AWS service is something which is accessed using public endpoints, such as S3. S3 can be accessed from anywhere which has an internet connection.

A private AWS service is something which runs within a VPC, so only things within that VPC or what is connected to that VPC, can access the service.

For both of these, there are permissions as well as networking, so even though S3 is a public service, by default an identity other than the account root user, has no authorization to access that resource.

-Permissions and networking are two different considerations when talking about access to a service

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

Three Different Network Zones

A

“Public Internet” Zone

This is the zone where internet–based services operate from, like online stores, gmail and various online games.

“AWS Public” Zone

It’s a network that runs between the public internet and the AWS private zone networks. This zone is the network where AWS public services operate from, services with public endpoints such as S3.

-Access to Public AWS using Internet as transit

“AWS Private” Zone (VPC - Virtual Private Cloud)

These are isolated so VPCs can’t communicate with each other unless you allow it (VPC Peering), nothing from the internet can reach these private networks unless you configure it. Services can be placed into these private zones, such as EC2 instances and it can only access the internet, using a Internet Gateway (IGW).

-Private services (EC2) can access the internet via IGW, as long as it has an allocated public IP address.
-EC2 can access the AWS public zone via IGW, for services such as S3. (This data doesn’t touch the public internet)
-Private services (EC2) can be given a public IP - 1:1 translated by the IGW, this allows the resource to be accessed from the public internet.
-On-premises can access VPCs only if configured via VPN or Direct Connect

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

AWS Global Infrastructure

A

AWS have created their infrastructure platform to be a collection of individual infrastructure located worldwide.

AWS Regions

It’s an area of the world that they have selected, and inside this region there is a full deployment of AWS infrastructure. AWS Regions consist of multiple, physically separated and isolated Availability Zones that are connected with low latency, high throughput, highly redundant networking.

-Regions are geographically spread - as a SA, we can use these regions to design systems which can withstand global level disasters
-When you interact with most AWS services, what you’re doing is interacting with that service in a specific region
-You can refer to it using a region code or name

As a Solutions Architect, regions have three main benefits:

  • Geographic Separation - Isolated Fault Domain = If something terrible happens such as a terrorist attack or a natural disaster, then a problem in one region wouldn’t affect other regions.
  • Geographic Separation - Different Governance = By picking a region, you will be affected by the laws and regulations of the region that your infrastructure is stored in.
  • Location Control - Performance = Regions give you location control, which allows you to tune your architecture for performance. You can place infrastructure as close to your customers as possible.

Availability Zones

Availability Zones consist of one or more discrete data centers, each with redundant power, networking, and connectivity, and housed in separate facilities. These are distinct locations within an AWS Region that are engineered to be isolated from failures in other Availability Zones.

-Services can be placed across multiple availability zones, to make them resilient, by using VPC

AWS Edge Locations

You often can’t have a region in the same town or city as all of your customers, and for this reason, AWS also provides edge locations.

Edge locations are much smalled than regions, and generally only have content distribution services, as well as some types of edge computing.

-They are located in many more places than regions
-Edge locations are useful for companies like Netflix, who need to store TV shows and movies, as close to their customers as possible, this allows low latency and high speed distribution

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

Service Resilience

A

-Globally Resilient = These are services that operates globally with a single database, it’s one product, and it’s data is replicated across multiple regions inside AWS (IAM & Route 53)

-Region Resilient = These are services which operates in a single region, with one set of data per region. Their services operates as separate services in each region and they generally replicate data to multiple AZs in that region.

-AZ Resilient = These are services that are run from a single AZ. If the AZ that the service is provisioned into fails, then the service will fail. (Are very prone to failure)

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

Virtual Private Cloud (VPC) Basics

A

VPC is the service, you will use to create private networks inside AWS, also VPCs is the service which is used to connect your AWS private networks to your on-premises networks, when creating a hybrid environment, or it’s the service which lets you connect to other cloud platforms when you’re creating a multi-cloud deployment.

  • A VPC = A Virtual Network inside AWS
  • A VPC is within 1 account & 1 region
  • Private and Isolated unless you decide otherwise
  • Two types - Default VPC (1 per region) and Custom VPC (many per region - very flexible)
  • VPC CIDR = defines the start and end range of IP addresses that the VPC can use (Default VPC can only have 1 CIDR while Custom VPC can have multiple)

The way in which a VPC provides resilience is that it can be subdivided into subnets, which is short for subnetworks. Each subnet inside a VPC is located in one AZ (Default VPC have one subnet )

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

Default VPC Facts

A
  • One per region - can be removed & recreated
  • Default VPC CIDR is always 172.31.0.0/16
  • /20 Subnet in each AZ in the region
  • Internet Gateway (IGW), Security Group (SG) & NACL
  • By default subnets assign public IPv4 addresses
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Elastic Compute Cloud (EC2) Basics

A

EC2 provides access to virtual machines known as instances.

Key Facts & Features

  • IAAS - Provides Virtual Machines => Instances
  • Private service by-default - uses VPC networking
  • AZ Resilient - Instance faults if AZ fails
  • Different instance sizes and capabilities
  • On-Demand Billing - Per second (Depends on the software)= There are few components to an instance charge.. for running the instance (amount for CPU and memory), for the storage that the instance uses and then extras for any commercial software that the instance is launched with
  • Local on-host storage (Instance Store) or Elastic Block Store (EBS)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Instance Lifecycle

A

An instance can be in one of a few states:

  • Running = After it finishes provisioning or if you decide to start it again from “Stopped”
  • Stopped = If you shut down the instance
  • Terminated = If you delete it (Non-reversible action)

These are important because they influence the charges for the instance.

At a high level, an instance is composed of:

  • CPU = Determines how much processing can be achieved.
  • Memory = Super fast area to store data, that’s currently being worked on by the instance.
  • Disk = Medium-term data is stored (EBS)
  • Networking = Is how the instance communicates with other entities in AWS and beyond.

-When an instance is at the “Running” state you’re being charged for all four categories.
-When an instance is at the “Stopped” state you’re only being charged for storage (EBS).
-When an instance is at the “Terminated” state you will not be charged.

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

Amazon Machine Image (AMI)

A

An AMI is an image of an EC2 instance.

  • They can be used to create an EC2 instance or from an EC2 instance.
  • Contains attached permissions and these control which accounts can and can’t use the AMI.

-Permissions

– Can be set as a public AMI - everyone is allowed to launch.
– The owner of an AMI is implicit allowed to create EC2 instances from that AMI.
– You can add Explicit permissions, where the owner grants access to that AMI for specific AWS accounts.

-Root Volume

It’s the drive that boots the operating system.

-Block Device Mapping

Which links the volumes that the AMI has and how they’re presented to the operating system. So it determines which volume is the boot volume, and which volume is a data volume.

– The O.S expects to receive volumes presented to it, as well as an ID, a device ID, and the block device mapping links the volume to the device ID that the O.S expects.

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

Connecting to EC2

A

EC2 instances can run different O.S

  • Windows instances using Remote Desktop Protocol (RDP), using the port 3389.

You need to provide a private key to gain access to the local administrator password of the instance and then you connect to that instance using RDP, using the local admin user and that password.

  • Linux instances you use the SSH protocol, using the port 22. When you are connecting to Linux instances you log in or authenticate to that instance using what’s known as an SSH key pair (Private and Public)

You can only download the private key once, because this is how you will authenticate to the instance.

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

Simple Storage Service (S3) Basics

A

-Global Storage Platform - regional based/resilient =Regional because it’s data is stored in a specific AWS Region at rest and never leaves that region unless you explicitly configure it to. Regional Resilient because the data is replicated across availability zones in that region.

-Public service, unlimited data & multi-user = You can access to it as long as you have an internet connection, runs from the AWS public zone, it’s “unlimited” and it’s designed for multi-user usage of that data.

-…Movies, Audio, Photos, Text, Large Data Sets

-Economical & accessed via IU/CLI/API/HTTP
-Default storage service in AWS
-Objects = Are the data the S3 stores, a picture, an episode of a tv show or it could be large scale datasets. (Files)
-Buckets = Are containers for objects.

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

Object S3

A

An object in S3 is made up of two main components:

-Key (file name) = foto.jpg = the key identifies the object in a bucket
-Value = Is the data or content of the object (From zero bytes to 5TB)

Objects also have a Version ID, Metadata, Access Control and Subresources.

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

Buckets S3

A

Are created in a specific AWS region.

-Your data that’s inside a bucket, has a primary home region and it never leaves that region unless you configured it. (Stable and controlled data sovereignty)
-By creating a bucket in a region you can control what laws and rules apply to that data.
-Its identified by it’s name, needs to be globally unique across all regions.
-Can hold an unlimited number of objects. (Infinitely scalable storage)

As an object storage system, an S3 bucket has no complex structure, it has a flat structure. All objects stored within the bucket at the root level.

Inside S3 there’s no concept of file type based on the name, they are just objects. Folders in S3 are represented when we have object names => /old/Picture1.jpg. When we create object names like this, then S3 presents them in the UI as a folder called “old”. Folders are often referred to as prefixes in S3 because they’re part of the object name.

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

EXAM POWER UP

A

-Bucket names are globally unique
- 3-36 characters, all lower case, no underscores
-Start with lowercase letter or a number
-Can’t be IP formated e.g. 1.1.1.1
-Buckets - 100 soft limit, 100 hard per account = How to structure a system which has a potentially 1000s of users, when you can’t create a bucket per user? Take a single bucket, and divide it up using prefixes.
-Unlimited objects in bucket, 0 bytes to 5TB
-Key = Name, Value = Data

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

S3 Patterns and Anti-Patterns

A

-S3 is an object store - not fiel or block
-You CAN’T MOUNT an S3 bucket as (K:\ or /images)
-Great for large scale data storage, distribution or upload.
-Great for “offload” = if you have a blog with lots of posts and lots of images, audio or movies, instead of storing that data on an expensive compute instance, you can move it to an S3 bucket and configure your blog software to point your users at S3 directly.
-INPUT and/or OUTPUT to MANY AWS products = Most services which consume data and or output data can have S3 as an option, to take data from or put data to when it’s finished.

Amazon Resource Name (ARN) = All resources in AWS have a unique identifier.

-ARNs uniquely reference one resource within AWS.
Bucket ARN => arn:aws:s3:::koalacampaign12111999

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

CloudFormation Basics

A

Is a tool which lets you create, update, and delete infrastructure in AWS, in a consistent and repeatable way using templates.

-Rather than creating and updating resources manually, you create a template, and CFN will do the rest on your behalf.
-It allows you to do automated consistent provisioning.

A CloudFormation Template is written either in YAML or JSON.

  • Resources = Will tell CF what to do (this is the only mandatory part of the template.
  • Description = You would use this to give some details about the template. (Must follow the template format version)
  • Template format version = Is the way that AWS allow for extending the standards over time.
  • Metadata = It’s got many functions, but one of the things that it does is, it can control, how the different things in the CFN template are presented through the console UI, so through the AWS Console, if you’re applying it. So you can specify groupings, you can control the order, you can add descriptions and lables. (It’s a way to how the UI presents the template)

-Parameters = Is where you can add fields which propmt the user for more information. So if you apply the template from the console UI, you will see boxes that you need to type in, you might use this for, which size of instance to create, the name of something, the number of availability zones to use. Parameters can even have settings for which are valid entries, so you can apply criteria for values that can be added as parameters and you can also apply default values.

-Mappings (Optional Section) = key/value pairs which can be used for lookups (allows you to create lookup tables)

  • Conditions = These allow decision making in the template. So you can set certain things in a template, that will only occur if a condition is met. This is a 2-step process, 1 => create condition, 2 => the condition is used within resources in the CFN template.
  • Outputs = Are a way that one the template is finished, it can present outputs based on what’s being created, updated, or deleted.
17
Q

CloudFormation Basics 2

A

Resources inside a CFN template are called Logical Resources, and they have:

-Type = CFN uses this to know what to create
- Properties = CFN uses to configure the resources

When you give a template to CloudFormation, then it creates a Stack.

  • Stack = Contains all of the logical resources that the template tells it to contain. For any logical resources in the stack, CFN makes a corresponding physical resource in your AWS account.

It’s CloudFormation job to keep the logical and physical resources in sync.

-When you use a template to create a stack, CloudFormation will scan the template, create a stack with logical resources inside, and then create physical resources which match.

-If you update the template, you can use it to update that same stack (logical resources will change) and CloudFormation will perform the same actions on the physical resources.

-If you delete a stack, its logical resources are deleted, which causes CloudFormation to delete the matching physical resources.

Whenever you upload a template to CFN, what is actually doing is uploading the template directly to a S3 bucket, that it creates automatically

18
Q

CloudWatch (CW) Basics

A

It’s a support service which is used by almost all other AWS services, especially for operational management and monitoring. (Public Service)

-Collects and manages operational data on your behalf, opertional data is any data generated by an environment, either detailing how it performs, how it nominally runs, or any logging data that it generates.
-If you have a public internet connection, and permissions to add data to CloudWatch, It can be used for almost everywhere.
-It gives you a UI, a command line interface, or an API interface to access that data.

19
Q

CloudWatch Performs three main jobs:

A

-Metrics = Allows the collection of metrics, monitoring of metrics, and actions based on metrics. Metrics are simply data relating to AWS products, applications, or on-premises systems. (CPU utilization of EC2 instances, disk space use on an on-premises server, or the number of visitors per second to your website)

Some metrics are gathered natively by the product (CPU utilization of EC2 instances, that’s done by default), some types of metric collection need an extra piece of software called CloudWatch Agent. Also monitoring certain things inside products which aren’t exposed to AWS needs the Agent, for example, if you want to monitor which processes are running on an EC2 instance, or the memory utilization of those processes, you’ll need CloudWatch Agent.

-CloudWatch Logs = Allows for the collection, monitoring, and actions based on logging data. Almost anything which is logged can be ingested by CloudWatch Logs, for on-premises infrastructure, custom logs, or anything outside of what’s exposed to AWS natively, you’ll need the CloudWatch Agent.

-CloudWatch Event = This functions as an event hub, it provides two powerful features: -If an AWS service does something, maybe an EC2 instances is terminated, started, or stopped, then CloudWatch Events will generate an event which can perform another action. -Generate an event to do something at a certain time of days of week.

20
Q

CloudWatch Concepts

A

Namespace = Is a container for monitoring data, it’s a way to separate things into different areas.

Namespaces have a name, as long as it stays within a rule set for namespaces names, but there’s one exception, and that’s that all AWS data goes into an AWS namespace, which is called AWS/ and then the service name (AWS/EC2 for all metric data for EC2).

Namespaces contain related metrics.

21
Q

Metric, Datapoint, Dimensions & Alarms

A

Metric

Is a collection of related data points in a time ordered structure. A metric is not for a specific server, CPU utilization is the metric, and that metric might be receiving data for lots of different EC2 instances.

We need a way of identifying which things log data to a specific metric.

Datapoint

Every time any server measures its utilization and sends it into CloudWatch, that goes into the CPU utilization metric and each one of those measurements is called Datapoint.

Consists of two things: -Time stamp = 2022-01-12T08:45:45Z (timezone) when the measurement was conducted. - Value = 98.3, which represents 98.3% CPU utilization

The CPU utilization metric, could contain data for many servers. How do we separate the data for these?

Dimensions

Dimensions separate datapoints for different things or perspectives within the same metric. These are Name value pairs which allow CloudWatch to separate things within a metric.

An example of this is, when sending data points into CloudWatch for CPU utilization of EC2, AWS also send in the instance ID and Instance type, and this allows us to view datapoints for particular instance.

Alarms

Are created and are linked to a specific metric, then based on how you configure the alarm, it will take an action based on that metric.

States:

-OK = Everything is ok.
-ALARM = Something bad has happened - The metric in some way is not in a good state. Based on that you can define an action.
-INSUFFICIENT_DATA = How alarms start before they’ve amassed enough data to assess whether they should be in an OK or ALARM state.

22
Q

The Shared Responsibility Model

A

Is how AWS provide clarity around which areas of systems security are theirs, and which are owned by the customer.

  • The model is useful as you learn about AWS and so this lesson provides a brief introduction.
  • Keep in mind the infrastructure stack (IaaS, PaaS & SaaS)
23
Q

High-Availability

A

Aims to ensure an agreed level of operational performance, usually uptime, for a higher than normal period.

-HA isn’t aiming to stop failure and it doesn’t mean that customers won’t experience outages.

A highly available system is one designed to be online and providing services as often as possible. It’s a system designed, so that when it fails, it’s components can be replaced or fixed as quicky as possible, often using automation to bring systems back into service.

-HA is about maximizing a system’s online time.
-HA is about minimizing any outages.
-You can have two servers online constantly, one active and one standby, in case of a failure, when they migrate from the active server, they might have to re-login or might have some small disruption.
-System availability is generally expressed with percentage of uptime.
-HA has costs required to implement it. (using spare equipment)

Example = 4x4 in the desert.

24
Q

Fault-Tolerance

A

Is the property that enables a system to continue operating properly in the event of the failure of some(one or more faults within) of its components.

It means it has to continue operating through a failure without impacting customers.

-In case of a failure, you can swap the server with another server but this would cause a system error, a disruption. However quick the fix, however small that disruption, in certain situations, it can be life threating. (HA isn’t enough)
-Fault Tolerance systems are designed to work through failure with no disruption. For example, we might have the system’s monitor communicating with two servers at the same time, in an active-active configuration. So this is not just a simple fail over configuration, if a server failed, it would drop down to just communicating with the remaining server. (as long as one server remains active, the system is fully functional)
-Harder to design, harder to implement and costs much more

Example = A plane in the air

25
Q

Disaster Recovery

A

Is a set of policies, tools and procedures to enable the recovery or continuation of vital technology infrastructure and systems following a natural or human-induced disaster.

So while HA & FT are about designing systems to cope or operate through disaster, Disaster Recovery is about what to plan for and do when disaster occurs, which knocks out a system.

-Pre-Planning = Build a set of processes and documentation, plan for staffing and physical issues.(Make sure you have a standby servers, extra backups, taking regular backups and store them in a different site)
-Can be automated using the cloud
-Make sure that you have copies of all your processes available.

DR is designed to keep the crucial and non replaceable parts of your system safe, so that when a disaster occurs, you don’t lose anything irreplaceable.

Example = Pilor or passenger ejection systems

26
Q

Route 53 Fundamentals

A

AWS managed global DNS service with a single database.

Provides two main services:

-Register domains
-Host zones - managed nameservers

The data that is storesd or managed is distributed globally as a single set and is replicated between regions (Globally Resilient)

27
Q

Register Domains

A

It has relations with all of the major domain registries, these are the companies which manage the TLD (.com/.io/.net)

To register a domain, first, R53 checks with the registry for that top level domain, if the domain is available

if available, then R53 creates a zone file for the domain being registered (zone file is a database which contains all of the DNS information for a particular domain), as well as creating the zone file, R53 allocates name service for this zone. (put the zone file in four managed name servers)

Then it communicates with the .com registry and liaising with that registry, it adds these name server records into the zone file for the .com TLD. By adding the name server records to the .com zone, they indicate that our four name servers are authoritative for the domain.

28
Q

Hosted zones

A

It lets you create and manage zone files, these are called hosted zones.

-Hosted on four AWS managed name servers.
-Can be public, which means data is accessible from the internet.
-Can be private, which means that is linked to VPC(s). (to host sensitive DNS records)
-Hosts DNS records referred to recordsets.

29
Q

DNS Record Types 1

A

-Nameserver (NS)

These are the record types which allow delegation to occur in DNS.

.com zone = this zone will have multiple nameserver records inside it for amazon.com. These nameserver records are how the dot com delegation happens for amazon.com and they point at servers managed by the amazon.com team, and these servers host the amazon.com zone.

-A and AAAA Records

These records map host names to IP addresses.

A www ====> 172.217.25.36 (v4)
AAAA www ====> 2404:6800:4006:802::2004 (v6)

As an SA, you’ll normally create two records with the same name (A and AAAA)

The client O.S and DNS software on that client, can then pick the correct type of address that i wants.

-CNAME Records

Let’s you create the equivalent of DNS shortcuts, so host to host records.

Let’s say, we have A server which points at 172.217.25.36 (v4), it’s fairly common that a given server performs multiple tasks (maybe it provides ftp, mail and web services).

Creating 3 CNAMEs and pointing them all at the A server record means that they will all resolve to the same IP version 4 address.

-CNAMEs are used to reduce admin overhead
-CNAMEs can not point at an IP address only other names

30
Q

DNS Record Types 2

A

MX Records

Is how a servers can find the mail server for a specific domain

-Whenever you send an email to a domain

MX records have two main parts:

google.com zone

A mail ====> 172.217.25.36 (v4)

-Priority
-Values = can be just a host (mail)

Our email servers looks at the two address on the mail so hi@google.com, and it focuses on the domain so google.com, It then does an MX query using DNS on google.com and it retrieves any MX records, in this case, two different records:

MX 10 mail
MX 20 mail.other.domain. «««««&laquo_space;Fully Qualified Domain Name

This is where the priority value is used to choose which record to use.

-Lower values for the priority field are actually higher priority. In this example “mail” is used first, if the priority is the same then any of them could be selected.

Which ever is used the server gets the result of the query back and it uses this to connect to the mail server for google.com via SMTP&raquo_space; 172.217.25.36, and it uses this protocol to deliver the mail.

TXT Records

Allow you to add arbitrary text to a domain. It’s a way in which the DNS system can provide additional functionality.

-Used to prove domain ownership

TTL = Time To Live

A TTL value is something that can be set on DNS records. It’s a numeric value in seconds

If i query the nameserver for amazon.com and i’m querying the www record in amazon.com, then i get back an authoritative answer. But using TTL values, the administrator of amazon.com, can indicate to others how long records can be cached for, what amount of time is appropriate.

-Low values mean more queries against your nameservers
-High values mean less queries, but also less control, if you need to change records

31
Q

Fundamentals Quiz 1

A

What Permissions options does an AMI have?
-Public Access, Owner only, Specific AWS Accounts

What is NOT stored in an AMI?
-Instance Settings
-Network Settings

What is true of an AWS Public Service?
-Located in the AWS Public Zone
-Anyone can connect, but permissions are required to access the service

What is true of an AWS Private Service
-Located in a VPC
-Accessible from the VPC it is located in
-Accessible from other VPCs or on-premises networks as long as preivate networking is configured

What is true of Simple Storage Service (S3)
-S3 is an AWS Public Service
-S3 is a object storage system
-Buckets can store an unlimited amount of data

What is a CloudFormation Logical Resource
-A resource defined in a CloudFormation Template

What is a CloudFormation Physical resource
-A physical resource created by creating a CloudFormation Stack

What is a simple and correct definition of High Availability?
-A system which maximises uptime

32
Q

Fundamentals Quiz 2

A

Which of the following is a correct definition of a fault tolerant system?
-A system which allows failure, and can continue operating without disruption

How many DNS root servers exist?
-13

Who manages the DNS Root Servers
-12 large organizations

Who Manages the DNS Root Zone
-IANA

Which DNS Record Type converts a HOST into an IPv4 Address
-A

Which DNS Record type is how the root zone delegates control of .org to the .org registry
-NS

Which type of organisation maintains the zones for a TLD (e.g .ORG)
-Registry

Which type of organisation has relationships with the .org TLD zone manager allowing domain registration?
-Registrar

How many subnets are in a default VPC
-Equal too the number of AZs in the region the VPC is located in

What is the IP CIDR of a default VPC
-172.31.0.0/16