Amazon Web Services
Amazon Web Services
Site-to-site VPN
This modality is also known as the router-to-router VPN. A site-to-site VPN
establishes a secure connection between two or more physical locations
(sites) over the internet. The VPN connection is typically established
between the routers or firewalls at each site, instead of between individual
devices.A site-to-site VPN is designed to connect entire networks of
different offices, data centers, or branches to create a unified and secure
network. This type of VPN makes it possible to share resources and data
between connected sites, like they were on the same local network.AWS
offers a solution called AWS Site-to-Site VPN. It is is a fully managed
service that’s designed to create a secure connection between a
company’s data center (or branch office) and their AWS resources by
using IP Security (IPSec) tunnels. When a company uses AWS Site-to-Site
VPN, they can connect to both their virtual private clouds (VPCs) and AWS
Transit Gateway. In addition, they can use two tunnels per connection for
increased redundancy.For more information, see AWS Site-to-Site VPN.
Summary
VPNs are an entire world in themselves!In summary, a client-to-site VPN
connects individual users to a company's network. In contrast, a site-to-
site VPN connects entire networks of different physical locations, and it
allows the sites to communicate securely like they were part of the same
network.In the corporate world, a VPN helps with environment isolation
regardless of the type of VPN you choose. Companies use VPNs to create
isolated virtual tunnels that link remote employees or third-party offices to
the central network. This isolation is designed to confine data and
communications within the designated network, and to minimize the risk
of unauthorized access or data leaks.
Operating systems and software
Operating systems (OS) power the devices that you use every day, from
smartphones and laptops to servers. Operating systems are software that
manages the computer hardware and software resources, and provides
common services for computer programs. When you use your devices,
several different programs or applications are running in parallel, and they
all need access to your computer's resources. Resources—such as the
central processing unit (CPU), memory, and storage—must be shared
across application. The operating system coordinates this sharing to make
sure that each program gets what it needs.
Common examples of operating systems include Windows, macOS, Linux,
and Ubuntu.
Key components of an operating system
The kernel
An operating system is made up of multiple parts, and one major part is
responsible for the essential functions of the OS: the kernel. The kernel
interacts directly with the underlying hardware. It provides essential
services and functionality that enable both software applications to run,
and system resources to be managed efficiently.
The kernel is responsible for various essential functions that the operating
system needs to work effectively. The kernel performs the following key
functions:
Memory management: The kernel manages system memory. It
allocates and deallocates memory space for processes, and is
designed to use memory efficiently.
Process scheduling: The kernel handles the scheduling and
execution of processes. It enables multiple processes to run
concurrently on a single processor, or across multiple processors.
Device drivers: The kernel provides the necessary drivers to
facilitate communication between the operating system and
hardware devices. The operating system uses these drivers to
interact with peripherals, such as printers, network adapters, and
storage devices.
Interrupt handling: The kernel handles hardware interrupts, which
are signals that devices send to get the attention of the operating
system. It manages the response to interrupts and coordinates the
execution of appropriate interrupt service routines.
To learn more about the kernel for Linux operation systems, see What Is
the Linux Kernel?
File systems
An operating system helps store and manage files on your computer.
Programs are made up of files, and you work with files of all types when
you use your devices. A file system is a storage mechanism that an
operating system uses to store, organize, and retrieve files and data. The
type of file system that the operating system uses defines the structure
and rules for naming, organizing, and accessing files in storage.
File management is a general term that covers various operations,
including creating, opening, closing, reading, writing, and deleting files.
The file system makes it possible to perform these operations efficiently. It
also provides organization to make it easier to navigate and retrieve files.
File systems typically adopt a hierarchical structure, which means that it
organizes files and directories in a tree-like arrangement. This structure
helps users categorize and manage their data effectively.
The following key terms describe parts of a file system:
Directories: Also known as folders, directories serve as containers
for files and subdirectories. They make it possible to organize files
into logical groups by providing a hierarchical structure to access
and manage data.
Files: Files are containers for storing data, and files are saved within
directories. They represent documents, programs, media files, or
any other type of information.
Processes and threads
In this course, you learned about processes and what they are. A process
represents an instance of a running program. Though the videos didn’t
cover the concept of threads, you should be aware of threads when you
work in IT.
Threads are individual units of execution within a process. They share the
same memory space and resources, and they enable concurrent
execution. You can think of threads as lightweight processes that enable
multitasking within a single program. You might come across the term
multithreaded, which refers to a program where processes can run
multiple threads at the same time.
With most types of computers, multiple programs and threads will run
concurrently. This situation requires process scheduling, which is another
core piece of operating systems. Process scheduling makes it possible to
have capabilities for multiprogramming and multitasking. It facilitates the
simultaneous coexistence of multiple processes in memory that execute
concurrently. Scheduling determines the processes that get access to the
CPU, which makes multitasking possible.
To learn more about processes and threads, see Difference between
Processes and Threads.
The command line
You briefly learned about how to use a command line interface (CLI). The
CLI provides a text-based way to interact with a computer. CLIs take in
commands as input, and the commands are then run by the computer. You
can do many different tasks by using the CLI, but the types of commands
you construct depend on the operating system that you use. If you run an
operating system like Linux, you could use Bash on the command line. In
contrast, if you use Windows, it’s common to use PowerShell.
To learn more about the command line in general, see Command Line
Crash Course.
Bash
Bash is one of the most common and popular command-line interfaces. It
stands for Bourne Again SHell. It's essentially a program that you use to
give instructions to your computer by entering text commands. Bash can
perform various tasks based on those commands.
When you open the terminal, you see a blank screen with a symbol-based
prompt, such as $ or >. When you see the prompt, Bash is waiting for you
to tell it what to do and you can start entering Bash commands.
For example, if you want to see the file that are in a folder, you can enter
ls (which stands for list) and press Enter. Then, Bash will show you a list of
files in the current directory. If you want to change the directory, you can
use cd (which stands for change directory), followed by the folder's name.
For example, cd Documents will take you into the Documents folder
To back out of a directory and go one level up in the hierarchy, you can
use the following command: cd ../
Bash can do more than navigate your files. It can also help you create,
copy, move, and delete files and directories. You can open and edit text
files by using Bash, search for specific text in files, and perform other
useful tasks.
Additionally, you can use Bash to run other programs and scripts by
entering their names and passing any necessary arguments. For example,
say that you have a program called my_program, and it needs some input
to run. You can run it by entering the following command, and pressing
Enter:
./my_program argument1 argument2
Bash can also be used for scripting tasks. Scripting can become complex,
and it’s out of scope for this course. However, it’s good to know the use
cases for bash.
To learn more about Bash, see the Bash Reference Manual.
PowerShell
PowerShell is also a command-line interface that you can use to interact
with your computer. However, PowerShell is specifically designed for
Windows operating systems.
When you open PowerShell, you see a window with a command prompt,
which looks like the following example:
PS C:\Users\YourUsername>
The PS stands for PowerShell. The text after PS shows your current
location in the file system, which is typically the user's home directory.
PowerShell commands are called cmdlets (which is pronounced like
“command-lets”). These cmdlets are designed to work together and
perform various tasks, and can function like building blocks. They use a
consistent verb-noun naming convention to make them easier to
remember. Consider the following examples:
To list the files in a directory, you can use the Get-ChildItem cmdlet.
To change the directory, you can use the Set-Location cmdlet.
PowerShell can perform many tasks, such as creating, copying, moving,
and deleting files and folders. You can also use it to interact with the
Windows Registry and manage processes, services, and network
configurations.
PowerShell also supports scripting, which means that you can write and
save sequences of commands into scripts that have the .ps1 extension.
This way, you can automate tasks and run complex operations with a
single command.
To learn more about PowerShell, see Windows PowerShell Reference.
AWS Command Line Interface (AWS CLI)
Beyond CLIs such as Bash and PowerShell, you can also use specialized
CLIs that are designed to interact with various services and platforms on
the internet. The AWS Command Line Interface (AWS) is one such
example.
The AWS CLI is a tool that AWS provides so you can manage and interact
with AWS services directly from your command line. With the AWS CLI, you
don’t need to use the AWS Management Console, which is a browser-
based interface.
To learn more about the AWS CLI, see AWS Command Line Interface.
Characteristics of microservices
Microservices often have the following characteristics.
Autonomous
Each component service in a microservices architecture can be developed,
deployed, operated, and scaled without affecting the functioning of other
services. Services don’t need to share any of their code or implementation
with other services. Any communication between individual components
happens through well-defined APIs.
Specialized
Each service is designed for a set of capabilities and focuses on solving a
specific problem. If developers contribute more code to a service over
time, and the service becomes complex, it can be broken out into smaller
services.
Agile
Microservices foster an organization of small, independent teams that take
ownership of their services. Teams act within a small and well-understood
context, and they are empowered to work more independently and more
quickly. This model shortens development cycle times. You can benefit
significantly from the aggregate throughput of the organization.
Flexible scaling
With microservices, each service can be independently scaled to meet
demand for the application feature that it supports. Teams can thus right-
size infrastructure needs, accurately measure the cost of a feature, and
maintain availability if a service experiences a spike in demand.
Easy deployment
Microservices enable continuous integration and continuous delivery
(CI/CD), which can make it easier to try out new ideas or roll back if
something doesn’t work. The low cost of failure facilitates
experimentation, makes it easier to update code, and accelerates time-to-
market for new features.
Technological freedom
Microservices architectures don’t follow a one-size-fits-all approach. Teams
have the freedom to choose the best tool to solve their specific problems.
As a consequence, teams that build microservices can choose the best
tool for each job.
Reusable code
By dividing software into small, well-defined modules, teams can use
functions for multiple purposes. A service that’s written for a certain
function can also be used as a building block for another feature. This
structure means that an application can bootstrap off itself because
developers can create new capabilities without writing code from scratch.
Resilient
Service independence increases an application’s resistance to failure. In a
monolithic architecture, the entire application can fail if a single
component fails. With microservices, applications handle total service
failure by degrading functionality but not crashing the entire application.
AWS services and microservices
You can use the following AWS services in microservices architectures.
Compute
Amazon Elastic Compute Cloud (Amazon EC2): Can run many
different kinds of resources, including your application computing
Amazon Elastic Container Service (Amazon ECS): Is a highly
scalable, high-performance container management service that
supports Docker containers; runs applications on a managed cluster
of EC2 instances
AWS Lambda: Is a serverless computing service that you can use
to run code without managing servers; works well for microservices
components
Storage and Databases
Amazon EC2: Can run many different kinds of resources, including
your application database
Amazon Relational Database Service (Amazon RDS): Offers
managed database services for popular relational databases, such
as MySQL, PostgreSQL, and Oracle
Amazon DynamoDB: Is a fully managed NoSQL database service
that provides scalability and low-latency access for large-scale
applications
Networking
Application Load Balancer: Load-balances HTTP and HTTPS traffic
at the application layer (level 7); provides advanced request routing
that’s targeted at the delivery of modern application architectures
(including microservices and containers)
Amazon API Gateway: Can process hundreds of thousands of
concurrent API calls; handles traffic management, authorization and
access control, monitoring, and API version management
Amazon Route 53: Provides internal Domain Name System (DNS)
names for APIs
Messaging
Amazon SNS: Is a fully managed publish/subscribe (pub/sub)
messaging service that you can use to decouple and scale
microservices, distributed systems, and serverless applications
Amazon SQS: Is a fully managed message-queuing service that
you can use to decouple and scale microservices, distributed
systems, and serverless applications
Logging and monitoring
Amazon CloudWatch: Collects and tracks metrics, collects and
monitors log files, sets alarms, and can automatically react to
changes across your running services and AWS resources
AWS X-Ray: Provides an end-to-end view of requests as they travel
through your application through a map of your application’s
underlying components; can also provide a centralized view of logs
so you can monitor and troubleshoot complex interactions as
microservices work together to handle a request
All computers on the internet—from your smart phone or laptop to the
servers that serve content for massive retail websites—find and
communicate with one another by using numbers. These numbers are
known as IP addresses. When you open a web browser and go to a
website, you don't need to remember and enter a long number. Instead,
you can enter a domain name, such as example.com, and still end up in
the right place.
The Domain Name System (DNS) translates human-readable domain
names (for example, www.amazon.com) into the machine-readable,
numeric IP addresses (for example, 192.0.2.44) that computers use to
connect to each other.
The internet’s DNS system works much like a phone book by managing
the mapping between names and numbers. DNS servers translate
requests for domain names into IP addresses. They control which server
an end user will reach when the user enters a domain name into their web
browser. These requests are called queries.
A DNS service, such as Amazon Route 53, is a globally distributed service
for translating domain names (such as www.example.com) into IP
addresses (such as 192.0.2.1). For more information, see Amazon Route
53.
The following diagram gives an overview of how recursive and
authoritative DNS services work together to route an end user to a
website or application. This process is usually done in milliseconds!
1. A user opens a web browser, enters www.example.com in the
address bar, and presses Enter.
2. The request for www.example.com is routed to a DNS resolver,
which is typically managed by the user's internet service provider
(ISP). Examples of ISPs include cable internet providers, DSL
broadband providers, or corporate networks.
3. The DNS resolver for the ISP forwards the request for
www.example.com to a DNS root name server.
4. The DNS resolver for the ISP forwards the request for
www.example.com again, this time to one of the top-level domain
(TLD) name servers for .com domains. The name server for .com
domains responds to the request with the names of the four Amazon
Route 53 name servers that are associated with the example.com
domain.
5. The DNS resolver for the ISP chooses an Amazon Route 53 name
server and forwards the request for www.example.com to that name
server.
6. The Amazon Route 53 name server looks in the example.com hosted
zone for the www.example.com record and gets the associated
value (for example, the IP address for a web server, such as
192.0.2.44). The Amazon Route 53 name server then returns the IP
address to the DNS resolver.
7. The DNS resolver for the ISP finally has the IP address that the
user’s web browser needs. The resolver returns that value to the
web browser. The DNS resolver also caches (stores) the IP address
for example.com for an amount of time that you specify so that it
can respond more quickly the next time someone browses to
example.com.
8. The web browser sends a request for www.example.com to the IP
address that it got from the DNS resolver. The requested webpage
content can be reached through this IP address. For example, the
content could be on a web server that runs on an Amazon Elastic
Compute Cloud (Amazon EC2) instance or an Amazon Simple
Storage Service (Amazon S3) bucket that's configured as a website
endpoint.
9. The web server (or other resource at 192.0.2.44) returns the
webpage content for www.example.com to the web browser, and
the web browser displays the page.
10. Morgan] It's time to put all the pieces together.
11. Let's trace what happens
12. when you load a website in your browser.
13. First, you enter the domain name into the URL bar,
14. and we know that the domain name maps
15. to an IP address somewhere behind the scenes,
16. and that DNS is managing this record.
17. So, your computer needs to make a call
18. to the DNS server that is configured
19. for the network you are on,
20. to look up the IP address
21. it should be talking to for this domain.
22. DNS will respond with the IP address,
23. and then it's time for your computer
24. to create a TCP/IP connection with the server.
25. So, your computer makes this connection with the server.
26. A handshake has happened and we can now begin communicating.
27. Your browser can send an HTTP request
28. for the desired webpage,
29. but we want to ensure that this request is secure,
30. so it will use HTTPS.
31. To do that, it will use an encryption protocol,
32. like Transport Layer Security, otherwise known as TLS.
33. This is used to encrypt the data
34. that will be sent over the internet.
35. So, you make your HTTPS request to the server,
36. but you won't be communicating directly
37. with the backend server, most likely.
38. Most websites that you visit
39. require more than one server to power them.
40. There is a fleet of servers answering requests.
41. The request you sent
42. will be routed to the load balancer,
43. which acts as a sort-of a point of presence for the website.
44. It will accept the requests from the public internet,
45. then route them to the appropriate backend server.
46. Which server to send the request to
47. is usually done using some sort of algorithm
48. to determine which server has the capacity
49. to take on the request.
50. Then, the server receives the request,
51. does the work it needs to do,
52. and returns the assets like the HTML, CSS, and JS.
53. The server responds to the load balancer,
54. which then, in turn, responds back to the client
55. with the data the browser needs.
56. Then, all that is left,
57. is for the browser to render the page.
58. The HTML defines the elements on the page,
59. the CSS defines the style,
60. and the JavaScript is there to add any interactions
61. or make requests to backend servers as needed
62. to load dynamic data.
63. Then, you have your website loaded up in the browser.
64. So that's it, that's the process end to end.
Internet basics
The video about putting all the pieces together gave you a high-level idea
of what happens when you follow a request that’s being responded to by a
web server. You gained the information that’s needed for you to get
started on the topic and perhaps be able to navigate through that type of
question if it appears in a job interview. Today, things in IT have many—
even thousands—of small components under the hood, and this world of
requests and responses is no different.
In this reading, you explore some of the concepts that you learned in the
videos at a deeper level to help you expand your understanding.
DNS caching
Consider what happens when your computer makes a call to the Domain
Name System (DNS). The first request for a domain goes to DNS, and DNS
returns the IP address or data that’s associated with the record. However,
if you make a second request on the same domain, it will check something
called the DNS cache.
A cache is a temporary storage location that stores frequently accessed
data or information closer to the point of use. If you need to find
information from a database or service somewhere, you can first check to
see if the data you need is in the cache instead of traveling the entire way
back to the source.
The cache speeds things up because you can access that data quickly
without going all the way back to the original source each time you need
something.
However, data in caches can become stale, which means that the source
has changed, but the copy in the cache still has the old value. This
situation is where a concept called time to live (TTL) comes in. When you
use a cache, you typically give each piece of data a time to live, or a
configurable amount of time that the data’s valid in the cache before it’s
deleted.Caches are used in many places in IT, and DNS is one of those
places.
Think about this scenario: say that you go to amazon.com in your browser,
and you accidentally close the window. You open another window and
enter amazon.com in the browser again. When you attempt to access the
website again, does the browser need to send a new request to the DNS
server?
Most of the time, operating systems store things like IP addresses and
other DNS records in a local cache, which results in the faster retrieval of
future requests. This cache, known as the DNS cache, reduces the need
for browsers to make new requests for redundant data. The DNS cache
essentially eliminates a network call that would otherwise be made to
DNS, which helps the page load faster.
In general, caching is used to reduce latency when data is retrieved. You
will see caches used with databases and other data storage systems as
you begin your work in IT.
A cache is one example of how the components that you are learning
become more complex up as you take a closer look at them and see their
details. For now, don’t worry too much about completely grasping these
details. This course is focused on getting you to a place where you can
begin to work hands-on and expand your knowledge of the details for
each component you learn about. As an entry-level IT employee, it’s more
important for you to understand the concepts and use cases; you will build
your knowledge of the details as you work with these systems.
TCP/IP
Transmission Control Protocol/Internet Protocol (TCP/IP) is a set of
communication protocols that internet-connected devices use to
communicate with each other.
As covered earlier in the course, data that’s sent between two networked
devices is broken down into small units called packets. Packets contain
data and information about where they came from and where they need
to go. These packets travel separately, and can take different paths to
reach their destination. TCP/IP requires that packets contain information so
that the message can be put back together in order. After all the packets
arrive at the destination, they are put back together to form the complete
message.
When requests are made between computers, this process happens
extremely fast under the hood. If you explore this topic further, you’ll see
that TCP/IP has a whole process and a world of concepts. It’s another
example of how you can define something from a high level, but if you
take a closer look, it can have complex details that make it work. Again,
you should focus on gaining concept-level understanding at this point.
HTTP and HTTPS
Both Hypertext Transfer Protocol (HTTP) and Hypertext Transfer Protocol
Secure (HTTPS) are topics that include a lot of information that this course
hasn’t covered. The difference between the two involves security. When
you see HTTPS in the web address, it means that the connection between
your browser and the website is encrypted, which means that it’s more
difficult for someone to gain unauthorized access to your data. In contrast,
HTTP doesn't have that additional layer of security.
Under the hood, many things happen that make it possible to have a
secure HTTPS connection.
HTTPS works by using an extra layer of security called Secure Sockets
Layer/Transport Layer Security (SSL/TLS). This layer encrypts the data
that’s exchanged between your browser and the website's server, which
makes it more difficult for anyone to intercept and understand that data.
It's similar to putting your message in a secret code that only the intended
recipient can decipher.
The following list describes a simplified breakdown of how HTTPS works:
1. When you connect to a website with HTTPS, your browser requests a
secure connection.
2. The website's server responds by sending its SSL/TLS certificate,
which contains a public key.
3. Your browser checks if the certificate is valid and trustworthy, and
that the website is what it claims to be.
4. If the certificate is valid, your browser generates a random
encryption key and encrypts it by using the server's public key. Only
the server can decrypt this by using its private key.
5. At this point, your browser and the server share a secret encryption
key, which is known as a session key. All the data that’s exchanged
between your browser and the server is encrypted by using this
session key.
6. Encrypted data is sent back and forth securely, which protects your
information from being intercepted or tampered with. Encrypted
data is not human readable, and only someone with the session key
can decrypt the data to read it.
7. The browser receives the encrypted data and uses the session key
to decrypt it, so that the website's content can be rendered and be
made human readable.
Now, you take a closer look at HTTP in general. For the following section,
remember that these concepts apply to both HTTP and HTTPS.Before you
learn more detailed information about HTTP, it’s helpful to know some
common terms that people use when they discuss HTTP.
For example, HTTP methods is one term that you’ll hear. HTTP methods
are the defined ways that your browser can talk to a web server. That is,
you have a set of actions that you can take, and these actions are defined
through these HTTP methods.Methods refer to the actions that can be
performed on a resource. They indicate what the browser or client wants
to do with a particular web page or resource.
A resource refers to information that can be accessed through a Uniform
Resource Locator (URL). A resource in this context can be a webpage, an
image, a document, or any other digital content that can be requested or
manipulated through HTTP.
The most common HTTP methods are GET and POST. When you choose a
link or enter a web address, your browser uses the GET method to ask the
website for a specific page or resource. It's similar to saying, "Hi, I want to
see this resource!" The POST method is used when you submit a form on a
website, such as when you fill out a registration form. POST sends the
information that you entered in the form to the website's server. Thus,
GET is for retrieving resources, and POST is for sending resources.
The following table lists HTTP methods and their use cases:
HTTP Method Use Case