Aws Technical Essentials
Aws Technical Essentials
AWS provides cloud computing services. The IT resources mentioned in the cloud
computing definition are AWS services. For the course's corporate directory
application, you will use AWS services to architect a scalable, highly available, and
cost-effective infrastructure to host the corporate directory application. That way, you
can get the app out into the world quickly, without managing heavy-duty physical
hardware.
Go global in minutes
–
Applications can be deployed in multiple Regions around the world with a few clicks. This
means that you can provide lower latency and a better experience for your customers at a
minimal cost.
Infrastructure, like data centers and networking connectivity, still exists as the
foundation of every cloud application. In AWS, this physical infrastructure makes up
the AWS Global Infrastructure, in the form of Regions and Availability Zones.
Regions are geographic locations worldwide where AWS hosts its data centers. AWS
Regions are named after the location where they reside. For example, in the United
States, the Region in Northern Virginia is called the Northern Virginia Region, and
the Region in Oregon is called the Oregon Region. AWS has Regions in Asia Pacific,
Canada, Europe, the Middle East, and South America, and we continue to expand to
meet our customers' needs.
Each AWS Region is associated with a geographical name and a Region code.
Here are examples of Region codes:
AWS Regions are independent from one another. Data is not replicated from one
Region to another, without explicit customer consent and authorization.
When you decide which AWS Region to host your applications and workloads,
consider four main aspects – latency, price, service availability, and compliance.
COMPLIANCE: Enterprise companies often must comply with regulations that require
customer data to be stored in a specific geographic territory. If applicable, choose a Region
that meets your compliance requirements.
LATENCY: If your application is sensitive to latency (the delay between a request for data
and the response), choose a Region that is close to your user base. This helps prevent long
wait times for your customers. Synchronous applications such as gaming, telephony,
WebSockets, and Internet of Things (IoT) are significantly affected by high latency.
Asynchronous workloads, such as ecommerce applications, can also suffer from user
connectivity delays.
PRICING: Due to the local economy and the physical nature of operating data centers, prices vary
from one Region to another. Internet connectivity, imported equipment costs, customs, real estate, and
other factors impact a Region's pricing. Instead of charging a flat rate worldwide, AWS charges based
on the financial factors specific to each Region.
SERVICE: Some services might not be available in some Regions. The AWS documentation provides
a table that shows the services available in each Region.
Availability Zones
Inside every Region is a cluster of Availability Zones (AZs). An AZ consists of one or
more data centers with redundant power, networking, and connectivity. These data
centers operate in discrete facilities in undisclosed locations. They are connected using
redundant high-speed and low-latency links.
AZs also have a code name. Since they are located inside Regions, they can be
addressed by appending a letter to the end of the Region code name. For example:
Therefore, if you see that a resource exists in us-east-1c, you can infer that the
resource is located in AZ c of the us-east-1 Region.
When you operate a Region-scoped service, you only need to select the Region you
want to use. If you are not asked to specify an individual AZ to deploy the service in,
this is an indicator that the service operates on a Region-scope level. For Region-
scoped services, AWS automatically performs actions to increase data durability and
availability.
On the other hand, some services ask you to specify an AZ. With these services, you
are often responsible for increasing the data durability and high availability of these
resources.
Maintain resiliency
To keep your application available, you must maintain high availability and resiliency.
A well-known best practice for cloud architecture is to use Region-scoped, managed
services. These services come with availability and resiliency built in. When that is
not possible, make sure your workload is replicated across multiple AZs. At a
minimum, you should use two AZs. That way, if an AZ fails, your application will
have infrastructure up and running in a second AZ to take over the traffic.
https://explore.skillbuilder.aws/learn/course/1851/play/45289/aws-technical-essentials-
104
Every action you make in AWS is an API call that is authenticated and authorized. In
AWS, you can make API calls to services and resources through the AWS
Management Console, AWS Command Line Interface (AWS CLI), or AWS software
development kits (SDKs).
The services are placed in categories, such as Compute, Storage, Database, and
Analytics
On the upper-right corner is the Region selector. If you choose it and change the
Region, you will make requests to the services in the chosen Region. The URL
changes, too. Changing the Region setting directs your browser to make requests to a
different AWS Region, represented by a different subdomain.
The AWS CLI is a unified tool that you can use to manage AWS services. You can
download and configure one tool that you can use to control multiple AWS services
from the command line and automate them with scripts. The AWS CLI is open-
source, and installers are available for Windows, Linux, and macOS.
For example, if you run the following API call against a service using AWS CLI:
Developers commonly use AWS SDKs to integrate their application source code with
AWS services. For example, consider an application with a front end that runs in
Python. Every time the application receives a cat photo, it uploads the file to a storage
service. This action can be achieved in the source code by using the AWS SDK for
Python. Here is an example of code you can implement to work with AWS resources
using the Python AWS SDK.
The level of responsibility AWS has depends on the service. AWS classifies services
into three categories. The following table provides information about each, including
the AWS responsibility.
Your level of responsibility depends on the AWS service. Some services require you
to perform all the necessary security configuration and management tasks, while other
more abstracted services require you to only manage the data and control access to
your resources. Using the three categories of AWS services, you can determine your
level of responsibility for each AWS service you use.
Due to the varying levels of effort, customers must consider which AWS services they
use and review the level of responsibility required to secure each service. They must
also review how the shared security model aligns with the security standards in their
IT environment, in addition to any applicable laws and regulations.
A key concept is that customers maintain complete control of their data and are
responsible for managing the security related to their content. For example, you are
responsible for the following:
https://aws.amazon.com/compliance/shared-responsibility-model/
Similar to a user name and password combination, you need both the access key ID
and secret access key to authenticate your requests via the AWS CLI or AWS API.
Access keys should be managed with the same security as an email address and
password.
Delete your keys to stay safe
If you don't have an access key for your AWS account root user, don't create one
unless you absolutely need to. If you have an access key for your AWS account root
user and want to delete the keys, follow these steps:
MFA on AWS
If you enable MFA on your root user, you must present a piece of identifying
information from both the something you know category and the something you have
category. The first piece of identifying information the user enters is an email and
password combination. The second piece of information is a temporary numeric code
provided by an MFA device.
Enabling MFA adds an additional layer of security because it requires users to use a
supported MFA mechanism in addition to their regular sign-in credentials. Enabling
MFA on the AWS root user account is an AWS best practice.
Supported MFA devices
AWS supports a variety of MFA mechanisms, such as virtual MFA devices, hardware
devices, and Universal 2nd Factor (U2F) security keys. For instructions on how to set
up each method, check out the Resources section.
IAM
AWS Identity and Access Management (IAM) is an AWS service that helps you
manage access to your AWS account and resources. It also provides a centralized
view of who and what are allowed inside your AWS account (authentication), and
who and what have permissions to use and work with your AWS resources
(authorization).
With IAM, you can share access to an AWS account and resources without sharing
your set of access keys or password. You can also provide granular access to those
working in your account, so people and services only have permissions to the
resources they need. For example, to provide a user of your AWS account with read-
only access to a particular AWS service, you can granularly select which actions and
which resources in that service they can access.
IAM features
To help control access and manage identities in your AWS account, IAM offers many
features to ensure security.
IAM is global and not specific to any one Region. You can see and
use your IAM configurations from any Region in the AWS
Management Console.
IAM is integrated with many AWS services by default.
You can establish password policies in IAM to specify complexity
requirements and mandatory rotation periods for users.
IAM supports MFA.
IAM supports identity federation, which allows users who already
have passwords elsewhere – for example, in your corporate network
or with an internet identity provider – to get temporary access to
your AWS account.
Any AWS customer can use IAM; the service is offered at no
additional charge.
IAM user
An IAM user represents a person or service that interacts with AWS. You define the
user in your AWS account. Any activity done by that user is billed to your account.
Once you create a user, that user can sign in to gain access to the AWS resources
inside your account.
You can also add more users to your account as needed. For example, for your cat
photo application, you could create individual users in your AWS account that
correspond to the people who are working on your application. Each person should
have their own login credentials. Providing users with their own login credentials
prevents sharing of credentials.
To access the AWS Management Console, provide the user with a user name and
password. For programmatic access, AWS generates a set of access keys that can be
used with the AWS CLI and AWS API. IAM user credentials are considered
permanent, which means that they stay with the user until there’s a forced rotation by
admins.
When you create an IAM user, you can grant permissions directly at the user level.
This can seem like a good idea if you have only one or a few users. However, as the
number of users increases, keeping up with permissions can become more
complicated. For example, if you have 3,000 users in your AWS account,
administering access and getting a top-level view of who can perform what actions on
which resources can be challenging.
IAM groups
An IAM group is a collection of users. All users in the group inherit the permissions
assigned to the group. This makes it possible to give permissions to multiple users at
once. It’s a more convenient and scalable way of managing permissions for users in
your AWS account. This is why using IAM groups is a best practice.
If you have an application that you’re trying to build and you have multiple users in
one account working on the application, you might organize the users by job function.
For instance, you might organize your IAM groups by developers, security, and
admins. You could then place all your IAM users into their respective groups.
This provides a way to see who has what permissions in your organization. It also
helps you scale when new people join, leave, and change roles in your organization.
A new developer joins your AWS account to help with your application. You
create a new user and add them to the developer group, without thinking about
which permissions they need.
A developer changes jobs and becomes a security engineer. Instead of editing
the user’s permissions directly, you remove them from the old group and add
them to the new group that already has the correct level of access.
The root user can perform all actions on all resources inside an AWS account by
default. This is in contrast to creating new IAM users, new groups, or new roles. New
IAM identities can perform no actions inside your AWS account by default until you
explicitly grant them permission.
IAM policies
To manage access and provide permissions to AWS services and resources, you create
IAM policies and attach them to IAM users, groups, and roles. Whenever a user or
role makes a request, AWS evaluates the policies associated with them. For example,
if you have a developer inside the developers group who makes a request to an AWS
service, AWS evaluates any policies attached to the developers group and any policies
attached to the developer user to determine if the request should be allowed or denied.
Putting this information together, you have a policy that allows you to perform all
actions on all resources in your AWS account. This is what we refer to as an
administrator policy.
Policy structure
When creating a policy, each of the elements shown in the table are required in the policy
statement.
https://docs.aws.amazon.com/en_us/IAM/latest/UserGuide/introduction.html
https://docs.aws.amazon.com/en_us/IAM/latest/UserGuide/access.html
Lock down the AWS root user
–
The root user is an all-powerful and all-knowing identity in your AWS account. If a
malicious user were to gain control of root-user credentials, they would be able to access
every resource in your account, including personal and billing information. To lock down the
root user, you can do the following:
Don’t share the credentials associated with the root user
Consider deleting the root user access keys
Enable MFA on the root account
User access keys only expire when you or the account admin rotates the keys. User login
credentials expire if you applied a password policy to your account that forces users to rotate
their passwords.
AWS SSO is an IdP that lets your users sign in to a user portal with a single set of
credentials. It then provides users access to their assigned accounts and applications in a
central location.
Similar to IAM. AWS SSO offers a directory where you can create users, organize them in
groups, set permissions across the groups, and grant access to AWS resources. However,
AWS SSO has some advantages over IAM. For example, if you’re using a third-party IdP,
you can sync your users and groups to AWS SSO. This removes the burden of having to re-
create users that already exist elsewhere, and it enables you to manage the users from your
IdP. More importantly, AWS SSO separates the duties between your IdP and AWS, ensuring
that your cloud access management is not inside or dependent on your IdP.
https://aws.amazon.com/blogs/security/how-to-create-and-manage-users-within-aws-sso/