AWS Certified Cloud Practitioner Certification for Node.js developers

AWS Certified Cloud Practitioner Certification for Node.js developers

Published?on?May 6, 2020

Do you want to be more than just another Node.js developer? (although being one is a great position these days)

Do you want to get a detailed high-level understanding of AWS services and get a certification from the most valuable company on Earth?

Do you want to leverage your existing AWS experience?

In this article, you will get all you need to start and pass the AWS Certified Cloud Practitioner Certification.

This is a foundational certification that tests your understanding of AWS services offering and the problems they solve.

It does not go into great details about each service, later certifications do.

Let’s be clear, this exam does not ask you a lot of details on AWS services.

You mostly need to understand the main use cases for specific services. For example, what service to use for a specific scenario.

Remember that this is geared toward people that will not necessarily implement the architectures but at least they will understand them.

That said, it’s always best to practice implementation, that way questions are similar to scenarios you have encountered.

FYI, yes, I passed the exam; not writing about something I don’t know. The secret is that writing this article help me pass it!



Why pass?it?

Simple answer:

The Cloud is always a great (not good, great) choice to add to your portfolio of skills.

Frankly, AWS certifications are difficult which makes them valuable on the market.

Okay, but why not go for the Certified Developer Associate Certification directly. You are free to do the most difficult AWS certification (Solutions Architect Professional) first. All this to say that if you are reading this article, it probably means that you are new to AWS.

As a newcomer to AWS (less than 2 years of full time practice), even if you deploy Node.js apps on AWS already, I recommend passing the Cloud Practitioner first. I can bet that you will learn a lot of new things about the AWS ecosystem.

It is not enough to “know about” EC2, Lambda, Elastic Beanstalk or RDS. You need to consolidate your knowledge about the ecosystem on which those services are part.

The AWS Certified Cloud Practitioner Certification is the foundational AWS certification and does not assume that you are a technical person. So basically, anyone, whatever their credentials, can pass it (after studying). That said, having a technical background is a great advantage because many concepts will be familiar.

As a Node.js developer, you may have used AWS on the job, while following a tutorial or used some other cloud provider like Heroku or Netlify.

AWS Certified Developer Associate Certification can be intimidating considering the amount of detailed knowledge you need. The developer certification is complex even for developers already building complex microservices architectures and web apps on AWS.

It is a great confidence booster to get an AWS certification even the simplest one, on your path to more complex ones. Moreover, it can consolidate your disperse knowledge about different aspects of the AWS Cloud and Cloud computing in general.

If you’re already an expert on AWS, just start from the associate-level certifications up. Otherwise, if you think starting from zero is the correct path than the cloud practitioner certification is for you.

Let’s be clear here, nothing is easy with AWS. Just because the Cloud Practitioner certification is an entry level certification, it does not mean that you can pass it tomorrow with no prior AWS knowledge.

In fact AWS recommends six months of practice, but you don’t need all that to pass the certification. For someone with a developer background, no prior AWS knowledge, I would say about a month of relaxed (but serious) preparation with one-hour everyday practice on the platform will make you ready to pass. For sure, you can pass it in a week or less with dedicated preparation (several hours per day).

It took me two weeks of everyday practice to pass. That said, I am using AWS at work for cloud development but my on-the-job knowledge would not have been sufficient.

In this article, we will look at AWS services in a more technical way because after all I assume that you are one (it’s in the title).

So let’s get started!



Exam Blueprint

You can find it at:

https://d1.awsstatic.com/training-and-certification/docs-cloud-practitioner/AWS_Certified_Cloud_Practitioner_Exam_Guide_v2.1.pdf

AWS Certified Cloud Practitioner(CLF-C01) Exam validates that you are able to;

  • Explain the value of the AWS Cloud.
  • Understand and explain the AWS shared responsibility model.
  • Understand AWS Cloud security best practices.
  • Understand AWS Cloud costs, economics, and billing practices.
  • Describe and position the core AWS services, including compute, network, databases, and storage.
  • Identify AWS services for common use cases.

Make sure to read it, it’s only two pages.



About the?Exam

  • 65 questions (more or less — some questions may just be there for statistical purposes but those are not marked)
  • 90 minutes.
  • You can get 30 minutes more if you are an ESL [English Second Language] speaker.
  • Just request ESL accommodations in the exam scheduling page (it’s automatically applied for all FUTURE exams; meaning you must request the accommodation before scheduling the exam.
  • Multiple choice and multiple response questions.
  • Passing score is 700/1000 (70%).
  • Valid for 3 years.



What is the Cloud (a.k.a Cloud Computing)??

Cloud computing is the on-demand delivery of I.T. resources like compute, database, applications and storage through a Cloud service provider like Amazon, Microsoft, Google, Alibaba.

These Cloud providers provide their services through a platform via the Internet with pay-as-go pricing.

There is a meme saying that;

Indeed, you can think of Cloud computing as renting someone else’s computer by the hour, the minute or the second.



Cloud Computing Deployments

There are 3 types of deployments:

  • Public cloud
  • Think of AWS, Microsoft Azure, GCP (Google Cloud Platform).
  • Hybrid cloud
  • A mixture of public and private cloud.
  • Private cloud
  • A.k.a “On Premise”, you manage it in your data centers. Think of OpenStack, Vmware, HyperV (or some AWS services offered on premise too).

More and more enterprise-grade companies are going full public cloud.



Creating a Free Tier?Account

Nothing special here, just go to https://aws.amazon.com/ and click on the “ Create an AWS account” button to signup for a free tier account.

Read more on the free tier here.

That free tier is valid one year so take advantage of it to pass a few certifications while training for free (or a cheap cost).

My piece of advice here is that the Cloud Practitioner is not about how to do things (services) on AWS but what and why to use it.

So please, if you are curious and start instances in services, make sure to stop and delete them right after you are done. You don’t want a surprise bill of tens or hundreds of dollars (happened to me — but I’ve learned my lesson). I will show you how to set billing alarms.

So, free tier only means that a certain amount of usage per service is offered by AWS. After that amount has been reached, you will pay.

One more thing, you can set alarms when you are about to exceed the free tier.



Creating Billing?Alarm

So you want to get a notification when you are about to exceed your budget??

Having a $10 / month budget to practice on AWS should be OK. I did not say that you will pay that each mount. This is a “I am willing to pay up to” limit. In most cases, with the free tier, you will not pay anything or a few cents or dollars here or there.

As I said before, this is your responsibility to read the free tier documentation to know exactly what and how much you can do at no cost and work within those limits.

So to create a billing alarm, log into your AWS console and go to CloudWatch service.

On the exam, if they ask you how to get automatic notifications if your account goes offer some amount of dollars, the answer is to go into CloudWatch and create a billing alarm, just like we did above.



AWS Global Cloud Infrastructure



AWS divides its infrastructure into:

  • regions;
  • availability zones;
  • edge locations.



AWS Regions

AWS has the concept of a Region, which is:

  • a physical location around the world;
  • a cluster of data centers (buildings filled with servers) called Availability Zones (AZ);
  • multiple, isolated, and physically separate AZ’s within a geographic area;
  • it offers a specific set of services (core services + select services based on location);
  • the number keeps growing as AWS expands worldwide.

Unlike other cloud providers, who often define a region as a single data center, the multiple AZ design of every AWS Region offers advantages for customers.

The GovCloud (us-west and us-east) regions are used by the federal government as well as private companies but their employees must only be U.S. citizens on U.S. soil. Their is a screening process.



AWS Availability Zones

Each AZ has independent power, cooling, and physical security and is connected via redundant, ultra-low-latency networks.

They are:

  • made up of two or more data centers;
  • low latency communication between AZ’s;
  • designed to isolate any failure to a single AZ;
  • redundant power, networking, and connectivity in an AWS Region.

All AZ’s in an AWS Region are interconnected with high-bandwidth, low-latency networking, over fully redundant, dedicated metro fiber providing high-throughput, low-latency networking between AZ’s.

One availability zone is actually be several data centers very close to each other, so conceptually considered as one entity.

Choosing a Region

Main reasons to choose a particular region are:

  • data sovereignty laws;
  • Think of companies that must store their data in their country for compliance and regulations (GDPR in Europe).
  • latency to end users;
  • Choose regions where the majority of your customers are located for more pleasant user experience (faster loading).
  • AWS services available
  • Not all regions have the same offering of services. Most of them have the core services (EC2, IAM, etc.) but other service are available only in specific regions. The US-EAST-1 region has all services before the rest of the world, so choose that region for practicing.



AWS Edge Locations

An edge location is a site that the AWS CloudFront service uses to cache copies of your content for faster delivery to users at any location.

They allow you to serve content where it is nearest to your users and it is tied one primary service.

Edge locations:

  • help facilitate global content delivery network (CDN);
  • used as nodes of a global CDN;
  • allows AWS to serve content from location closest to users;
  • primarily leveraged by AWS CloudFront and related services.

There are many more AWS edge locations than AWS regions.



Global AWS?Services

Here’s a list of AWS global services (more details later in this article):

  • IAM (Identity and Access Management);
  • Route53;
  • CloudFront;
  • SNS (Simple Notification Service);
  • SES (Simple Email Service).

Here are services that give a global view but are regional:

  • S3 (Simple Storage Service)

To remember them, think S.I.R.C.S.S. with all S. referring to “Simple N.E.S”

S.I.R.C.S.S. with all "s"'s referring to “Simple N.E.S”        

(Notification, Email, Storage).



AWS services deployed On?Premise

Yes, you can deploy some AWS services in your own data center (a.k.a On Premise).

Not all organizations allow Cloud services over the Internet (for national security reasons, as they say), that does not mean Amazon ignored this market.

Moreover, not all projects are run in environment were an Internet connection is available all the time (or at all). Think of projects in poles or dense forests or even on other planets (yes, you read that right…).

Here’s the list:

  • Snowball:
  • physical disk sent to your data center to transfer petabytes (PB) of data back to AWS Cloud, instead of transferring via the wire which could be too long;
  • Snowball Edge:
  • computer with storage, able to run Lambda functions on-premise (more on this lambda stuff later);
  • Storage Gateway:
  • physical device or virtual machine, stays on-premise, used to cache files and replicate them on Amazon S3;
  • CodeDeploy:
  • used to deploy your applications on your on-premise servers or on Amazon Cloud;
  • Opworks:?
  • used for configuration management automation (Chef and Puppet);
  • IoT Greengrass:
  • used to deploy and run code on IoT devices.

So remember that to deploy your applications on-premise you can use:

  • CodeDeploy;
  • Opsworks.



Shared Responsibility Model



The motto of AWS regarding shared responsibility is:

Security and compliance is a shared responsibility between AWS and the customer

This shared model can help relieve the customer’s operational burden as AWS operates, manages and controls the components from the host operating system and virtualization layer down to the physical security of the facilities in which the service operates.

AWS Responsibility:

  • security of the cloud (ensure security of data centers and related parts);
  • access and training for AWS employees;
  • global data centers and underlying networks (maintenance and update);
  • hardware for global infrastructure (physical servers and related, maintenance and update);
  • configuration management for infrastructure (deployment and monitoring);
  • patching cloud infrastructure and services.

Customer / your Responsibility:

  • security in the cloud (ensure security of your architectural choices, how you use AWS resources);
  • individual user access to cloud resources and user training;
  • data security and encryption (in transit and at rest);
  • operating system, network and firewall configuration (access management);
  • code deployed onto cloud infrastructure (apps and virtual networks);
  • patching guest operating systems and custom applications.



More on Shared Responsibility on AWS

So AWS manages security of the cloud but security in the cloud is your responsibility as a customer.

You retain control of what security you the customer chooses to implement to protect your own content, platform, applications, systems and networks, no different than you would on-premise.

For example, AWS is responsible for the security of the data center. You are responsible for the security of the EC2 instances by applying security patches, using encryption for your data in S3, etc.

AWS is responsible up to the software for managed services where you cannot directly access the operating system like Amazon RDS or S3. But still you are responsible for encrypting of your database, for creating backups, etc.

It is your responsibility to rotate your access keys and enable Multi Factor Authentication (MFA) and to transmit data over HTTPS or other secure protocol.

Also AWS is responsible for training its employees and you are responsible for training yours.

Think of AWS protecting the building and the parking, and the customer responsible for what’s going on inside the building.

Tips:

  • if you are able to do something using the AWS management console or the CLI or SDKs = you are responsible. If it’s about data centers, hardware and hypervisors (the things on which virtual machines are running), then it’s probably AWS responsibility.
  • Encryption is shared responsibility because if AWS encrypts your data using encryption keys provided by them for you then they are responsible for encryption. But you are still responsible for sending the data using HTTPS. If you provide your own encryption keys then you are also responsible for encryption.
  • everything running inside EC2 is your responsibility.
  • systems on which managed services are running are AWS responsibility (because you have no access to them).

More details at https://aws.amazon.com/compliance/shared-responsibility-model/



Economics of the?Cloud

One thing to know, you will never be tested on prices because they change all the time. I give some of them as an illustration.



The basic pricing policies of AWS are:

  • Pay as you go;
  • Pay less when you reserve;
  • Pay even less per unit by using more;
  • Pay even less as AWS grows (isn’t that something…);
  • Custom pricing;



The three fundamentals of cost with AWS are:

  • Compute;
  • Storage;
  • Data Outbound

To remember them, think Comp StoDOut

You need to understand that you start building with cost in mind before your infrastructure becomes large and complex.



Maximizing the power of flexibility

One key advantage of cloud resources is you don’t pay when they are not used. By turning off used resources, you can reduce your costs by 70% or more compared to running 24/7.



Pricing Models on AWS

Depending on resources, AWS offers the following pricing:

  • On-demand
  • Dedicated instances
  • Spot Instances
  • Reservations



Free Service

Here qre the services which are free even after the free tier period is finished:

  • IAM,
  • CloudFormation (you pay for provisioned resources),
  • Auto scaling (you pay for provisioned resources),
  • Elasstic Beanstalk (you pay for provisioned resources),
  • Opswork (similar to Beanstalk but for DevOps),
  • Consolidating Billing.



It’s about understanding how companies pay for traditional data centers and how that changes when they take advantage of cloud offerings.

The big idea is that you:

  • trade Capital Expense/Expenditure (CapEx) for Operating Expense (OpEx).
  • Pay only when you consume computing resources and only for how much you consume
  • benefit from economies of scale.
  • Amazon builds their own servers, network devices, etc.
  • don’t have to guess about capacity.
  • The Cloud scales with your business needs, with no long term contracts
  • increase speed and agility.
  • you can build your own platform using serverless computing that scales infinitely with demand
  • stop spending money running and maintaining data centers
  • The AWS teams handle that for you
  • you go global in minutes.
  • You are able to deploy your apps in multiple regions in the world by the click of a few buttons, therefore offering low latency for the worldwide customers.



Capitalized Expenditure (CapEx)

This type of expense has to do with initial investment. It consists of large upfront cost when adding a building, adding new servers or any supporting equipment.

This type of expense to achieve a fixed asset (receive value over time) is referred to as CapEx.



Operating Expenditure (OpEx)

This has to do with the day to day expenses of doing business. For example, utilities or the data connection for data centers who be covered as OpEx because you cannot run the business without them.

After the initial build of a data center, ongoing connectivity, utility and maintenance costs are considered to be OpEx.



Handling Demand in Data Center

Let’s say that we decide to build a data center for the latest app of our company. This will be a global app with growing demand over time

When we build our own data center, we do not get to scale it on-demand. We need to plan for the demand that we’re going to receive. Meaning that we must buy a lot of resources that will be unused at first and anticipate buying more resources to handle upcoming traffic.

The first issue with that model is that we have unused capacity. This means that we are paying for demand that we are not yet getting from our users. This expense goes unused until demand is there.

The next issue is demand overcapacity. This is the other way around. Now, we have the demand from users but we did not provision enough resources. Users will be left with outages because we didn’t allow for that amount of demand in our data center.

In terms of expenses, at first, there is a large CapEx for a steady OpEx that goes for that initial period. The OpEx is a steady expenditure because not tied to the demand (at least in theory).

But anytime we want to increase the capability of our data center to meet demand, we will need to make another large CapEx and as a corollary our OpEx will also increase because we now have more resources to manage.

All this to say that if you decide to build a data center, we need a lot of upfront capital (money + people) just to build the infrastructure, plus the maintenance cost. All this for an app that you are not sure it will ever be a success and generate money to cover expenses and make a profit.



Handling demand in the Cloud

For the same demand, when using the cloud, we are able to shift the capacity of the infrastructure that supports our application based o the demand. This enables capacity to row as demand grows.

Now instead of large CapEx, you have OpEx cost that matches the demand.



Financial Implications

Now, let’s compare the financial implications of both models.

Managing a data center.

  • large upfront costs (CapEx);
  • potential for either under-used capacity or unmet demand;
  • increasing capacity takes time (ordering physical resources) and additional investment (CapEx);
  • monthly costs will map to predicted infrastructure needs (you have to guess what user demand will be).

Leveraging cloud infrastructure:

  • no mandatory large upfront investment;
  • pay as you go for infrastructure (OpEx);
  • capacity can scale to meet user demand and can be provisioned immediately (AWS has you covered with regions, AZ’s and edge locations);
  • monthly costs will map to user demand.



Predicting and Managing AWS?Costs



AWS provide tools that you can use to make a case for the use of AWS cloud services in your organization. These tools can allow you to predict what the cost of services usage will be.



AWS Total Cost of Ownership (TCO) Calculators

This tool helps an organization to determine the savings by leveraging AWS cloud infrastructure instead of the data center model.

TCO calculators allow you to estimate the cost savings when using AWS and provide a detailed set of reports that can be used in executive presentations.

The calculators also give you the option to modify assumptions that best meet your business needs.

It is a cost comparison tool between running IT resources on-premise and in AWS cloud.



AWS Simple Monthly Calculator

It enables an organization to calculate the cost of running specific AWS infrastructure (OpEx).

Hosted on Amazon S3.

Available at https://calculator.s3.amazonaws.com/index.html

No longer supported as of June 2020, replaced by AWS Pricing Calculator (this info is not part of the exam until next update).



AWS Budgets

  • set custom budgets;
  • alert when costs or usage exceed (are forecasted to exceed) your budgeted amount;
  • used to budget costs before they have been incurred;



AWS Cost Explorer

AWS Cost Explorer is an interface that lets you visualize, understand, and manage your AWS costs and usage over time.

It provides breakdowns:

  • by service (track an AWS service usage and cost);
  • by cost tag (tag specific resources for expenses monitoring).

It also provides predictions for the next three months of costs based on your current usage.

It also gives recommendations for cost optimization.

Like most AWS services, it can be accessed via an API. You can therefore use that data for whatever your needs (data science, dashboards, etc.).

Used to explore costs after they have been incurred.



AWS Organizations

They allow you to organize multiple accounts from your existing organization under a single user account.

It provides organizations the possibility to leverage consolidated billing for all accounts. Therefore, you will receive one bill irrespective of how many AWS accounts there are in your organization.

All this permits organizations to centralize logging and security standards across accounts while still providing separated accounts for different users.

More on AWS Organizations down below.



Solution Architecture on?AWS



AWS has specific certifications dedicated to this topic (AWS Certified Solutions Architect).

Let’s have a high level view about that subject.



AWS Well-Architected Framework

The Well-Architected Framework has been developed to help cloud architects build secure, high-performing, resilient, and efficient infrastructure for their applications.

It is a collection of best practices across five key pillars for how best to create robust and secure systems that create value on AWS.

Here are the five pillars:

  1. Operational Excellence
  2. is about best practices on running and monitoring systems for business value, and continually improving processes and procedures.?
  3. Key topics include managing and automating changes, responding to events, and defining standards to successfully manage daily operations.
  4. Security
  5. is about best practices on protecting information & systems.?
  6. Key topics include confidentiality and integrity of data, identifying and managing who can do what with privilege management, protecting systems, and establishing controls to detect security events.
  7. Reliability
  8. is about best practices on the ability to prevent, and quickly recover from failures to meet business and customer demand.?
  9. Key topics include foundational elements around setup, cross project requirements, recovery planning, and how we handle change.
  10. Performance Efficiency
  11. is about best practices on using IT and computing resources efficiently.?
  12. Key topics include selecting the right resource types and sizes based on workload (set of components that together deliver business value) requirements, monitoring performance, and making informed decisions to maintain efficiency as business needs evolve.
  13. Cost Optimization
  14. is about best practices on avoiding unneeded costs.
  15. Key topics include understanding and controlling where money is being spent, selecting the most appropriate and right number of resource types, analyzing spend over time, and scaling to meet business needs without overspending.



Reliability in AWS

Reliability can be summarized to two key principles:

  • Fault Tolerance
  • is about being able to support the failure of components within an architecture.
  • High Availability
  • is about keeping the solution running as expected despite issues that may occur.



AWS Disaster Recovery Approaches

Even companies that have their own data centers can take advantage of AWS disaster recovery (D.R.).

Four architectures should be considered, from simplest to most complex:

  • Backup and Restore
  • consists in backing up key systems of your data center. They are stored to restored on AWS in case of D.R. event.
  • Pilot Light
  • consists in setting up minimal resources in AWS to support it in D.R. event.
  • For example, you keep a replica in AWS of the master database server in your data center.?
  • That replica is up and running so that in a D.R. event, you shift over traffic to AWS, scale up and support within AWS.
  • Warm standby
  • consists in running systems on AWS that can be scaled up up in case of D.R. event.?
  • All infrastructure needed is running on AWS but it is not yet scaled up.?
  • The infrastructure runs at low capacity but in case of D.R. event in your data center, it is ready to go so that you can switch traffic over to AWS and scale it up to meet user demand.
  • Multi-Site
  • consists in running systems in two regions and supporting users. You are continually leveraging both your data center and AWS, and you are actively sending users to both (this is called Active-Active architecture and ensures minimal downtime in D.R. event).

Understanding the needs of your organization to know which D.R approach to choose.



Support on?AWS



Once you deploy your infrastructure on AWS, it is essential to know how to support that infrastructure. AWS provides four different levels of support. It is important to understand the needs of your organization to know which level to choose.



The four levels are:

— AWS Basic support

  • provided for all AWS customers (included when you get an account);
  • access to Trusted Advisor (7 core checks only).
  • ?It gives info about how you are leveraging AWS, providing suggestions for subjects like security and cost optimization;
  • 24x7 access to customer service, documentation, forums and whitepapers.
  • No guaranties regarding support response time;
  • access to Personal Health Dashboard.
  • Another tool for optimizing how you leverage AWS;
  • no monthly cost.

— AWS Developer support

  • includes all features of basic support;
  • business hours access to support engineers.
  • You will be able to get someone engaged with you;
  • limited to one primary contact.
  • It is meant for individual developers like you;
  • starts at $29 per month.
  • It is tied to your AWS usage, the more AWS resources you use the more costly

— AWS Business support

Designed for organizations leveraging AWS for some production infrastructure.

  • includes all features of developer support;
  • full set of Trusted Advisor checks;
  • 24x7 phone, email and chat access to support engineers;
  • unlimited contacts.
  • Anyone in your organization can submit a support request;
  • starts at $100 per month.
  • It is tied to your AWS usage, the more AWS resources you use the more costly.

— AWS Enterprise support

Designed for enterprise organizations running mission critical apps on AWS.

  • includes all features of business support;
  • includes a designated Technical Account Manager (TAM).
  • That dedicated person helps you in how your enterprise is leveraging AWS:
  • includes a concierge support team.
  • Your issues will be resolved more quickly;
  • starts at $15,000 per month
  • it is tied to your AWS usage, the more AWS resources you use the more costly

To summarize:

  • basic support = free
  • developer support = $29 / month (price scales with usage)
  • business support = $100 / month (price scales with usage)
  • enterprise support = $15,000 / month (price scales with usage)



Support Response?Times

When you create a support ticket, the support response times will be dependent on the level that we assign to that issue.

For developer-level support:

  • general guidance: 24 business hours;
  • system impaired: 12 business hours;

For business-level support:

  • general guidance: 24 hours (notice it is hours, not business hours);
  • system impaired: 12 hours;
  • production system impaired: 4 hours;
  • production system down: 1 hour;

For enterprise-level support:

  • general guidance: 24 hours (notice it is hours, not business hours);
  • system impaired: 12 hours;
  • production system impaired: 4 hours;
  • production system down: 1 hour;
  • business-critical system down: 15 minutes;



Part 2: AWS Core?Services



Interacting with AWS Services

Here are the ways to interact with AWS services:

  • AWS console
  • You use your Web browser to configure AWS resources
  • AWS CLI (Command Line Interface)
  • Command line access to administer AWS resources. There is a main AWS CLI and other CLIs specifically to interact with dedicated AWS services (ex: Elastic Beanstalk CLI). Note: the CLI is written in Python.
  • AWS SDK (Software Development Kit)
  • Provides programmatic access to manage AWS resources from your source code. This allows to automate management of AWS.



AWS SDK Languages

AWS SDKs are available for the following programming languages:

  • C++
  • Go
  • Java
  • JavaScript (browser)
  • .NET
  • Node.js
  • Python
  • Ruby

There are also mobile versions of the SDK for Android and IOS.,



Networking and Content Delivery Services:



We will see the key services you need to know about.



Amazon Route 53

It is a DNS (Domain Name Service) within AWS. A DNS allows you to connect a domain name like medium.com to a specific IP address which is connected to specific servers.

53 in the name refers to port 53 which is the port reserved for DNS traffic.

Contrary to most services on AWS, Route 53 is a global service. Most services on AWS are regional, meaning that what you do on a service in a region will only apply to that region.

It is highly available. It allows you to reroute traffic from a faulty servers to healthy ones in different regions. You are able to handle failure and still provide the same levels of service.

It enables global resource routing. You can route users to different different sets of servers based on their latency or their region. It allows you to create a global architecture regardless of where your users are with similar levels of performance.

You can use Route53 to route requests to your own registered domain name (this ismydomain.com for example) to an S3 bucket containing the static assets for your website (make sure that the bucket has the same name as your domain, therefore the bucket should be called this ismydomain.com).



Amazon Virtual Private Cloud (VPC)

A Virtual Private Cloud is a logically isolated ( — meaning isolated programmatically, not physically) section of the AWS cloud were you can launch AWS resources in a virtual network that you define.

The Amazon VPC service enable these virtual networks in AWS.

It supports IPv4 and IPv6.

You can configure:

  • IP address range;
  • subnets (in AWS, a subnet generally corresponds to an A.Z);
  • route tables;
  • network gateways.

The VPC service supports different use cases:

  • public and private subnets;
  • NAT for private subnets (so that private subnets can access the Internet);
  • connection to your data center;
  • connecting one VPC to another VPC;
  • private connections to other AWS services;

Think of a VPC as your own data center inside AWS, it is your own responsibility.



AWS Direct Connect

This service makes it easy to establish a dedicated network connection from your premises (data center) to AWS.

There are several reasons you might want to do this, among them:

  • traffic coming into AWS from Direct Connect is priced cheaper than traffic coming in from the Internet,
  • your organization wants to connect things behind your firewall in your data center to AWS resources on private subnets within your VPC.
  • This allows to extend your data center into AWS cloud (sort of).



Amazon API Gateway

Amazon API Gateway helps developers to create and manage APIs to back-end systems running on Amazon EC2, AWS Lambda, or any publicly addressable web service.

With Amazon API Gateway, you can generate custom client SDKs for your APIs, to connect your back-end systems to mobile, web, and server applications or services.

This service provides:

  • managed API management.
  • AWS managed services don’t require you to provision resources. AWS gives you a ready made service that you customize according to your needs.
  • API management means that this service wraps around your existing API to add features such as caching, authentication, authorization, etc.
  • direct integration with other AWS services;
  • monitoring and metrics on API calls;
  • VPC and on-premise private applications support



Amazon CloudFront

Remember when we talked about edge locations??

CloudFront is the AWS service that uses them. CloudFront is a Content delivery network (CDN).

A CDN is a system of distributed servers that deliver webpages and other kinds of Web content to users based on their geographic location, the origin of the webpage and a content delivery server.

It enables users to get content from server closest to them and supports static and dynamic content.

It includes advanced security features like:

  • AWS Shield for DDoS (Distributed Denial Of Service — a lot of machines accessing your site at the same time to overflow the server and prevent new requests to succeed)
  • AWS WAF (Web Application Firewall)



More Details on CloudFront

Let’s review the terminology:

  • edge location:
  • This is the location where the content is cached.?
  • It is a different concept than AWS Regions and Availability Zones.
  • origin:
  • This is the origin of the content that the CDN distributes.?
  • It could be an S3 bucket, an EC2 instance, an Elastic Load Balancer or Route53.
  • distribution:
  • This is the name given to the CDN which consists of a collection of edge locations.

So, when CloudFront is enabled, users will first query the edge location nearest to their geographical location.

The first time the content is requested, the edge location will connect to the origin of the content to retrieve it. This will create latency.

The content is then cached / stored in the edge location and distributed to the user.

When another user in the same geographical region queries the same content, the edge location does not need to contact the origin because it has a copy of that content.

Users after the first one will get that content much faster.

The content is cached for an amount of time called the TTL (Time To Live) given in seconds. Usually, you have a TTL of 48 hours.

CloudFront is used to deliver websites including static, dynamic, streaming and interactive content using AWS global network of edge locations.

There are two types of distributions;

  • Web distribution;
  • This is used for websites.
  • RTMP (Real-Time Messaging Protocol):
  • - Adobe proprietary technology used for media streaming;
  • - discontinued in December 2020;



Practical Use of CloudFront

The origin can be a folder in an S3 bucket, not necessary the whole bucket.

You can even restrict direct access to the bucket and force going through the CDN to access S3 objects (more details in S3 section).

Here is an example of how it looks when your create an distribution:

The created distributions will have a domain name following this model:

<RANDOM_HASH>.cloudfront.net        


CloudFront Tips

  • edge locations are not read-only;
  • You can write files to them (think of S3 Transfer Acceleration);
  • objects are cached for the duration of the TTL (Time To Live);
  • You will be charged for clearing cached objects;
  • to delete a distribution you must first disable it (which is a lengthy process — remember that you are dealing with a global network of edge locations);

CloudFront Pricing

You pay for:

  • traffic distribution;
  • requests
  • data transfer out.



Elastic Load Balancing (ELB)

Elasticity = ability for the infrastructure supporting an application to grow and contract based on how much it is used at a point in time.

In essence:

  • distributes traffic across multiple targets;
  • For example, if your application runs on 10 servers, users can be routed any of them according to rules that you set.
  • integrates with EC2, ECS (EC2 Container Service — Docker containers), and Lambda (function as a service / serverless);
  • Meaning that you can redirect traffic to AWS-managed services or to servers that you manage.
  • supports one or more A.Z. in a region (high availability);
  • You can redirect traffic to several availability zones in one region for fault tolerance.
  • targets / endpoints of the load balancer are registered in Target Groups;
  • three types of load balancers:
  • — Application Load Balancer (ALB)?
  • - for Web application (including microservices and containers) traffic
  • - layer 7 (OSI model) load balancing: can do intelligent routing based on content/payload of requests (supports HTTP, HTTPS and Websocket requests).?
  • — Network Load Balancer (NLB) — for highest performance / static IPs, TCP traffic (supports TCP, TLS, UDP traffic);
  • — Classic Load Balancer (CLB) — legacy option (for test, dev to keep cost low — not the preferred option);

Tips:

  • when creating a load balancer (out of the scope of the Cloud Practitioner exam), make sure that the load balancer uses all Availability Zones so that it can route requests to all EC2 instances in these AZ’s (in the scope of the Cloud Practitioner exam).
  • You never want to expose the public IP addresses of you EC2 instances because IP addresses do change (when you restart EC2 instance). Moreover, you need to understand that EC2 instances are meant to be ephemeral (not permanent), your architecture needs to be able to handle instance replacement. It is better architecture to use an Application Load Balancer that will map requests to the instances no matter their IP addresses.
  • when creating an Application Load Balancer, you get a DNS address that maps your Application Load Balancer to the registered EC2 instances in the Target Groups attached to that Application Load Balancer (out of scope of Cloud Practitioner).



Security on?AWS



According to AWS Shared Responsibility Model:

Security and Compliance is a shared responsibility between AWS and the customer.



AWS Identity & Access Management (IAM)

IAM enables you to manage access to AWS services and resources securely.

Using IAM, you can create and manage AWS users and groups, and use permissions to allow and deny their access to AWS resources.

  • Service that controls access to AWS resources;
  • service provided free of charge by AWS;
  • manages both authentication and authorization;
  • supports identity federation;
  • You can use your organization’s user credentials to log into AWS.



IAM Identities

There are three types of identities in IAM:

  • Users:
  • Account for individual to access AWS resources. You have two types of users:
  • — root users: used to create your AWS account.?
  • This is the “god mode” admin. It has super permissions reserved to it like defining the support plan or deleting the account.?
  • You should harden the authentication of that user and not use it for day-to-day operations.
  • — IAM users: used for day-to-day operations.?
  • You attach different kinds of permissions to them to be able to manage AWS services.
  • Groups:
  • Allows to manage permissions for a group of IAM users.
  • Used when several IAM users have similar permissions.
  • It is a best practice to attach permissions to IAM groups rather than to individual IAM users.
  • To be clear, attach permissions at the group level.
  • Roles:
  • It enables a user or an AWS service to assume permissions for a task.
  • For example, a role allowing EC2 to access S3 storage can be attached to an EC2 machine.



IAM Policies

We grant permissions by using policies.

A policy is a JSON document that defines permissions for an AWS IAM identity (principal).

Defines both the AWS services that the identity can access and what actions can be taken on that service

Can be either customer managed or managed by AWS. AWS provides a set of managed policies.

For example, if you wanted to grant DynamoDB full access to a specific users so they could do everything within the service within that account, you would grant them the full access managed policy to DynamoDB.

But if you want a custom policy, you are free to write the JSON document yourself (or use the visual editor) to define the permissions. This would be a customer-managed policy.



AWS IAM Best Practices.

  • Multi-factor Authentication;
  • Ensures additional security by requiring a token generated from either a physical or virtual device for login.
  • Least Privilege Access:
  • Users should only be granted access to AWS resources that are required for their current tasks, no more.



More Details on?IAM

In IAM:

  • User:
  • - permanent named operator;
  • - users are global, they do not depend on region;
  • - could be human or machine;
  • - its credentials are permanent and stay with that user until a forced rotation (for example, password change, access keys changed, etc.).
  • Group:
  • - collection of users;
  • - many to many relationship with users;
  • Role:
  • - NOT your permissions;
  • - it is an authentication method;
  • - it represents an operator that could be human or machine;
  • - roles are global, not dependent on region;
  • - credentials with roles are temporary;
  • - you can attach a role to an EC2 instance to be able to access other AWS services inside your server (using AWS CLI).

Everything in AWS is an API. To execute these APIs, we first need to authenticate and then authorize.

The IAM Role is simply the authentication.

Permissions happen in Policy documents in JSON format. The policy document attaches directly to a user, a group or a role. This document lists APIs (or groups of APIs) that are being whitelisted / allowed against specific AWS resources.

Let’s take the example of an API call to S3. An operator want to upload a file into an S3 bucket, that’s an API call. It executes the call to PUT object TOTO in S3 bucket TITI, and this operator presents a set of credentials whether an access key secret key or a username and password. All of this is the API execution statement.

It then goes to the AWS API engine. The IAM engine verifies the credentials and validates that those are active authorization credentials and validates the identity of the operator (IAM user, group or role).

Then, the system takes the policy document associated with that validated operator and evaluates all the policy documents as a single view. It looks to see if the action you’re doing (put object in S3 bucket) is authorized by any of the policy documents attached to that identity. If it is, you are then allowed to execute the S3 API.

A policy document might also have an explicit denial. This overrides any “allow” statements. If you don’t have an “allow”, there is an implicit denial. This mechanism of explicit denial is useful to permanently deny some operations (API calls), for example, deny resource termination in production.

What to remember is that IAM identities (user, group, role) are for authentication and IAM Policy Documents are for authorization.

This model is useful in the case of compromised credentials:

Let’s say that you write your username and password on a sticker or a keylogger managed to capture your credentials. Moreover you are not using MFA (bad).

Let’s say that some hacker decides to ransom the company for Monero cryptocurrencies and deletes a few S3 buckets to prove its point. By detaching the Policy Document attached to the compromised IAM identities, that hacker will no longer be able to perform anything. The credentials will still be compromised but no permissions will be attached to the compromised identities.

Finally, never store credentials like username/password or access keys in EC2 instances. Prefer attaching a role with the minimum permissions to those instances



You can get more practice on IAM (this is out of the scope of the cloud practitioner certification) here?:

Deep Dive into AWS for Node.js developers — IAM

Do you want to be more than just another Node.js developer?? Do you want to grow as a developer??itnext.io



Security in Amazon VPC

  • Security groups;
  • - firewall rules for resources within the VPC.?
  • - stateful approach to security because the rules are attached to the resources (for example, security group for EC2 machine).?
  • - control inbound and outbound traffic for resources within the VPC.?
  • - used to allow traffic between services within a VPC or to the Web.
  • - to let all IP addresses in, you use 0.0.0.0/0;
  • - to let just one specific IP address, you use XXX.XXX.XXX.XXX/32 (32 means this IP address only);
  • Network A.C.L’s;
  • - Access Control Lists within your network.?
  • - This is a stateless approach to security.
  • - Control inbound and outbound traffic for subnets within the VPC.
  • - You look at inbound and outbound traffic and can block specific traffic coming from an IP address from entering into the subnet or leaving it.
  • Flow Logs;
  • Captures the information around traffic within your VPC.
  • Useful for debugging or spotting malicious traffic operating on your VPC.



Other Security Services on?AWS



AWS CloudTrail

  • Enables logging of all actions occurring within your AWS account. Make sure it is enabled for all accounts you manage.
  • used for auditing because everything (every action) is an API call in AWS.
  • increases visibility into your user and resource activity by recording AWS Management Console and API calls.
  • allows you to identify which users and accounts called AWS, the source IP address and when calls were made.
  • remember that every action is an API call in AWS.
  • think of CloudTrail as a CCTV for your account (per region).



AWS Inspector

  • automated security assessment service.
  • helps improve security and compliance of applications deployed on AWS.
  • automatically assesses applications for vulnerabilities or deviations from best practices.
  • produces a detailed list of security findings prioritized by level of severity.
  • these findings can be reviewed directly or as part of detailed assessment reports available in the service console or via the API.
  • runs individual host-level assessment on the EC2 instances.

Basically Inspector is an agent that you install in your EC2 instance that inspects the environment.



AWS Trusted Advisor

  • global service
  • online resource that helps:
  • - reduce cost,?
  • - increase performance,
  • - improve security
  • by optimizing your AWS environment (not just about security).
  • provides real time guidance to help you provision resources following AWS best practices.
  • advise you on:
  • - cost optimization,
  • - performance,
  • - security,
  • - fault tolerance.
  • Looks at your entire AWS account.
  • two flavors:
  • - core checks and recommendations (free);
  • - full Trusted Advisor (Business and Enterprise companies only).



AWS Shield;

  • Provides detection and mitigation of DDoS (Distributed Denial of Service) attacks (when fleets of bots target specific servers and make so many requests that it denies or slows access for legitimate users).
  • managed service that safeguards Web applications running on AWS.
  • - always-on detection.
  • inline mitigation that minimizes application downtime and latency.
  • no need to engage AWS support to benefit from DDoS protection
  • two tiers:?
  • - standard: comes automatically with all AWS accounts
  • - advanced: cost protection (you are reimbursed networking charges created by the DDoS attacks) among other additional features ($3000/month).



AWS WAF (Web Application Firewall):

  • Protects your web application from common exploits. It is configurable.
  • protects against exploits that could affect application availability, compromise security or consume excessive resources.
  • WAF inspects your Web traffic (layer 7 of OSI model = application) and looks for malicious behavior.
  • Hardware firewalls work at layer 4 (transport). Layer 7 (application) firewalls can see the application data traffic and inspect it.
  • having WAF in front of your load balancer can prevent SQL injections or cross-site scripting (XSS).
  • protects against “hackers” (malicious parties).



About Compliance on?AWS

AWS gets tested by third party organization to verify that it meets strict standards.

More details at aws.amazon.com/compliance.

You can also see the compliance reports by using the AWS Artifact service. AWS Artifact features a comprehensive list of access-controlled documents relevant to compliance and security in the AWS cloud. It is used to get documentation about compliance from worldwide authorities.

So AWS Artifact is used to retrieve compliance reports from all around the world.

One thing to remember is that just because AWS is compliant to standards does not mean that your applications running on AWS cloud are compliant too. For more details, see the shared responsibility section.



AWS Compute?Services



There are mainly 3 types of Cloud computing models (others exist)?:

  • Infrastructure as a Service (IaaS)
  • You manage your physical or virtual servers, as well as the operating systems (OS).
  • Platform as a Service (PaaS)
  • The platform provider manages the hardware and OS (security, patching, updates, maintenance, etc.) for you. You focus on your applications. Think of GoDaddy DNS provider.
  • Software as a Service (SaaS)
  • All you manage are the services of the applications offered by the software provider. Think of Gmail where you manage your inbox and Google handles the rest.



We will talk about the following compute services (the complete list keeps increasing):

  • Amazon EC2 (Elastic Compute Cloud);
  • Provides secure and resizable virtual servers on AWS (IaaS — Infrastructure as a Service).
  • AWS Lambda;
  • Enables compute without managing servers (FaaS — Function as a Service).
  • Amazon ECS (EC2 Container Service);
  • ?Manages and scales containerized applications (CaaS — Container as a Service).



Amazon EC2 (Elastic Compute Cloud)

EC2 reduces to minutes — not weeks or months like in the pre-cloud era — the time needed to obtain and boot new virtual server instances hence allowing you to quickly scale capacity both up and down as compute requirements change (scalability + elasticity).

EC2 features are:

  • Operating system and additional software are provided in an AMI (Amazon Machine Image);
  • Resources are provided by Instance Type
  • Instances can store data in two ways
  • — Instance store (attached to physical server on which your virtual server [EC2 instance] is running on). This kind of storage is only available while your virtual server is running.
  • — Elastic Block Store (EBS), block storage stored separately from your EC2 instance. Used for storage that is meant to persist or to be shared among multiple instances.
  • Launched into a VPC;
  • Secured by a VPC security group and key pair (used to SSH into your instance).
  • You need a private key to connect to EC2 instances;

To administer servers running on EC2, you use:

  • SSH (Secure Shell) for Linux server, on port 22;
  • RDP (Remote Desktop Protocol) for Microsoft servers, on port 3389;
  • HTTP runs on port 80
  • HTTPS on port 443;



AWS EC2 Instance Types

  • Define the processor, memory, and storage type that are available for your EC2 machines;
  • Cannot be changed without downtime, so choose wisely according to the target workload;
  • Provided in the following categories:
  • — General Purpose instance;
  • — Compute, Memory, and Storage Optimized instance options;
  • — Accelerated Computing (for machine learning workloads for example).



Scaling on Amazon EC2

  • Vertical scaling
  • scale up your instance type to a larger instance type with additional resources (mandatory downtime)
  • Horizontal scaling;
  • ?scale out and add additional instances to handle the demand of your application



Amazon EC2 Horizontal Scaling Services

  • Auto-Scaling Group;
  • Set of EC2 instances with rules for scaling & management.
  • Elastic Load Balancer;
  • Distributes traffic across multiple targets (EC2 machines, lambda functions, etc.).



Amazon EC2 Auto-scaling Group (ASG)

  • A Launch Configuration defines the instance template for the group (what instance types for machines in the group);
  • Defines the minimum, maximum, and desired number of instances;
  • Performs health checks on each instance;
  • Rules for defining if instances within the group are healthy (reachable).?
  • If unhealthy, an instance is terminated and replaced by a new one automatically.
  • Includes scaling policies that define scaling behavior;
  • In which conditions should the number of instance be scale out (percentage of processing power used, number of requests, etc.)?
  • Exists within 1 or more availability zones in a single region;
  • Always make sure that the ASG is highly available and fault-tolerant by selecting all availability zones. Remember, 1 AZ only is always a bad answer in the exam.

Note (mostly out of scope of Cloud Practitioner exam — but the concepts are in scope):

You can create your own custom AMI’s (Amazon Machine Image) that can be used in the launch configuration of an Auto Scaling Group, meaning that when you need to scale out, the new instances will be created based on your custom EC2 image.

This Golden Image (AWS vocabulary — ) is used as a template for launching EC2 instances.

Basically, you can first create the EC2 instance that meets your needs then generate a custom AMI image from that instance. Behind the scenes, it creates a snapshot of the EC2 instance and the custom AMI is based on that snapshot.

You will not be able to delete the snapshot until you first deregister the custom AMI image from the AWS marketplace.

Let’s say your Node.js server is running on an EC2 instance. You create an image from that instance which will encapsulate the file system and configuration so that when you launch an instance from this image it will already be configured and running another copy of your Node app. You can also launch user data script (which are bootstrap scripts that are launched when the instance is created) to update your custom instances when they are launched by the ASG.

By selecting all subnets when creating your ASG, it will automatically spread instances to multiple Availability Zones when creating new instances during scale out.



Amazon EC2 Horizontal Scaling Illustration

Let’s create a VPC with an Internet Gateway (to give it access to the Internet) within a region (us-east-1).

Then, let’s use two Availability Zones within that region.

Within each of these Availability Zones, let’s create an EC2 instance (C4 instance type) to serve our Node.js app.

Next, let’s create an Auto Scaling Group around these two instances. This will allow us to have centralized management of our instances in the different Availability Zones. It will also do health-checks on our servers and automatically decommission and recreate new ones in case of failure. In addition, it will allow us to meet the demand by horizontally scaling (scale out = provision additional new instances).

Next, we add Application Load Balancer to provide a centralized way to route users to the appropriate server within the Auto Scaling Group, so that users don’t need to know which sever to contact.

The Application Load Balancer communicates with the Auto Scaling Group in order to know which instances are available and healthy so that the the load balancer can send users to running servers.

We are now able to receive traffic from the Internet, route it to the appropriate server from the Application Load Balancer and ensure that our group stays healthy by managing the lifecycle of the servers within the Auto Scaling Group.



Amazon EC2 Purchase Options

  • On-demand instances;
  • - You pay by the second (or hour) for the instances that are launched without commitment;
  • - no upfront cost;
  • - This is the default option when you create an EC2 instance;
  • - Used for workloads that are short-term (spiky or unpredictable) that cannot handle interruption;
  • Reserved instances;
  • - You purchase at a discount instances in advance for 1–3 years:
  • - Depending on how much you pay upfront, that maximizes your discount;
  • - Used for applications with steady state and predictable usage that require reserved capacity;
  • - Users make upfront payment to reduce total cost (the lower the upfront payment, the lower the discount);
  • - Different types of reserved instances based on type of workload (standard, convertible, scheduled);
  • Spot instances;
  • - You can leverage unused EC2 capacity in a region for a large discount;
  • - You bid the price you want for instance capacity according to market price;
  • - You lose the instance if your bid is lower than market price, so your workload should be fault-tolerant;
  • - Used for applications with flexible start and stop times;
  • - Used for applications that required low compute prices (machine learning, data science, scientific computing in general);
  • - Also for users in need of urgent additional computing capacity;
  • - Note: only a good deal if bidding price is lower than on-demand pricing;
  • - Note 2: you are not charged for partial hour if your bid goes below market price BUT you will be charge for the hour if you terminate the instance yourself.
  • Dedicated Hosts:
  • - Physical servers dedicated to your use;
  • - Helps you reduce cost by allowing you to use existing server-bound software licenses (or CPU-bound software licenses);
  • - less and less used;
  • - Used for regulatory requirements that do not support multi-tenant virtualization (Government for sure, Intelligence and Military maybe);
  • - Used for licensing that does not support multi-tenancy or cloud;
  • - can be purchased on demand (hourly) or as a reservation (70% discount compared to on-demand dedicated host pricing);

If you have an instance that is consistent and always needed, you should purchase a Reserved Instance. For example, if you have servers that will be running all the time for the next few years, prefer this option for greatest discount for this usage.

If you have batch processing (fault tolerant workload) where the process can start and stop without affecting the job, you should leverage Spot Instances. These instances are available for a period of time. You bid on them and if what you have bid gets lower than current market price then your instance will be shutdown. The workload needs to be able to shutdown at any moment.

If you have an inconsistent need for instances that cannot be stopped without affecting the job, leverage On-demand Instances. You don’t know exactly how long you will need these instances and your workload is not fully fault tolerant (for development and test for example).

Bonus

Here’s a mnemonic to remember instance types (not required for the Cloud Practitioner exam):

F.I.G.H.T.D.R.M.C.P.X.Z — (“FIGHT DoctoR MaC PiXiZ”)

  • F: for FPGA;
  • I: for IOPS
  • G: for Graphics
  • H: for Hight Disk Throughput;
  • T: for cheap general purpose (T2.micro for example)
  • D: for Density
  • R: for RAM
  • M: for main choive for general purpose apps
  • C: for Compute
  • P: for graphics / general purpose GPU
  • X: for eXtreme memory
  • Z: for extreme memory and CPU

Of course, AWS keeps adding new types of instances for specific workloads but you don’t need to know the latest for exams (until the certification updates).



AWS System Manager

This service allows you to manage your EC2 instances at scale.

When you have a lot of EC2 instances, we talk about EC2 fleets. Fleets are not limited to EC2.

Basically, to manage all these resources, in each of them you have a daemon (process) also called agent running that connects to AWS System Manager.

AWS System Manager allows you to run commands on all your instances rather than SSH-ing in thousands of instances…

To recap:

  • used to manage EC2 fleets or virtual machines (VM);
  • agent installed on all VMs;
  • can be used in AWS or on-premise;
  • runs commands on all VMs to install/uninstall, patch software;
  • integrates with CloudWatch to watch all your estate of VMs;



Container Management Services for?AWS

This is another approach to leverage compute on AWS.

If your application consists of Docker containers, you can use the following AWS services to run your clusters:

  • Amazon E.C.S (EC2 Container Service);
  • Provides a container orchestration service on AWS.
  • This allows you to take your Docker containers and run them within the service and it will handle the process of leveraging the cluster that you scale up and provide and distributing the containers as defined.
  • AWS Fargate;
  • Enables containerized applications without managing servers.
  • Amazon E.K.S (Elastic Kubernetes Service);
  • Manages Kubernetes (k8s) applications in AWS.



AWS Lambda

Another AWS compute service:

  • Enables the running of code without provisioning infrastructure;
  • Only charged for usage based on execution time;
  • Can configure your Lambda functions to support memory from 128 MB to 3008 MB;
  • Integrates with many AWS services;
  • Enables event-driven workflows;
  • Primary service for serverless architecture.

Lambda Pricing

The following determines Lambda pricing:

  • Request pricing (how many requests your Lambda functions receive):
  • - free tier = 1 million requests per month;
  • - $0.20 per 1 million requests afterwards;
  • Duration pricing (how long your Lambda functions execute):
  • - 400,000 GB-seconds per month free (3.2 million seconds of compute time)
  • - $0.00001667 for every GB-second used afterwards;
  • Additional charges:
  • - you pay more if your functions communicate with other AWS services or transfer data (read/write requests);



AWS Elastic Beanstalk (EB)

Another service that automates EC2 management.

It is the simplest entry to AWS deployments because you just upload your source code and EB takes care of all the provisioning and deployment.

You can quickly deploy and manage applications without worrying about the infrastructure that runs your Node.js application (or whatever platform).

Its features are:

  • Automates the process of deploying and scaling workloads on EC2;
  • Supports a specific set of technologies (Node.js, Golang, Python, Docker, Java, PHP,?.NET).
  • Hint: supporting Docker means that you can run anything that runs in containers;
  • Leverages existing AWS services;
  • Only pay for the other services you leverage (EB is free in itself);
  • Handles provisioning, load balancing, scaling, and monitoring;



File Storage with?AWS



General File Storage Services

  • Amazon S3 (Simple Storage Service);
  • Scalable, secure, and durable object.storage service
  • Amazon S3 Glacier
  • Object storage service targeted at long-term and low-cost storage



Amazon S3 (Simple Storage Service)

  • Global Scope:
  • - S3 is not tied a particular AWS region, meaning that what you do in S3 applies to all regions. That said, it is important to understand that S3 buckets are deployed in specific regions even though the S3 service in itself is global.
  • Stores files in buckets;
  • They are logical grouping of files (text, video, audio, binaries, etc.) that you upload, that can have different permissions, lifecycle rules.
  • - Object-based storage (data lake);
  • - not a database;
  • - does not support running operating systems on it;
  • - bucket is like a folder in the Cloud;
  • - files from 0 bytes to 5 terabytes;
  • Bucket name must be unique because it creates a DNS entry that allows you to access the files via URLs.
  • Returns a 200 HTTP status when file upload what successful.
  • Provides different storage classes for different use cases;
  • Depending on how often you have your data and what degree of resilience you want.
  • Stores data across multiple availability zones;
  • By default, S3 stores data in a minimum of 3 availability zones.
  • Enables URL access for files?;
  • - You can give user access to the files with these URLs;
  • - S3 is a universal namespace;
  • - URLs follow this scheme:?
  • https://s3-<AWS_REGION>.amazonaws.com/<UNIQUE_BUCKET_NAME>?;
  • Can provide transfer acceleration for uploads using AWS edge locations;
  • Higher cost to upload data but useful if you upload large amounts.
  • Offers configurable rules for data lifecycle;
  • You can set rules for example to automate file deletion or file transfer to another type of storage after some time.



More Details on?S3



What is an object in S3??

Think of objects as files. They consist of:

  • Key;
  • This is the name of the object.
  • Value;
  • This is the data (sequence of bytes).
  • VersionID;
  • Used for versioning.
  • Metadata;
  • This is data about the data you are storing.
  • Subresources:
  • Access Control Lists (ACLs);
  • Torrent.

By default, when you upload an object in a S3 bucket, it is NOT public even if you have created that S3 bucket with public access.

By the way, it’s not an accident that everything is private access by default, it is part of the Well Architected framework Security pillar of AWS.

Most likely, you will make your bucket and objects public for static website asset sharing. So basically, make things public only when you use S3 as a content delivery server, for example when hosting static websites.

You have to explicitly make objects public:

The above solution is fine if you have very few files but a bucket can contain thousands or millions of files. In order to automatically make public all files that are uploaded to the bucket, you will need to create a bucket policy.

To do this, go to the Permissions tab of your bucket then the Bucket Policy tab:

Let’s have a look at the bucket policy JSON document:

{
 "Version": "2012-10-17",
 "Statement": [
  {
   "Sid": "PublicReadGetObject",
   "Effect": "Allow",  ====>  will allow 
   "Principal": "*",   ====>  EVERYONE
   "Action": [
    "s3:GetObject"     ====>  make GetObject API calls on S3 service
   ],
   "Resource": [
    "arn:aws:s3:::BUCKET_NAME/*"   ====> for all objects in bucket
   ]
  }
 ]
}        

You don’t need that level of detail at the Cloud Practitioner level but you are not just passing a certification, you are learning real life skills. Of course, there is documentation on how to write JSON bucket policies.

You can also change encryption and storage classes of objects on the fly.

What to understand is that S3 is a key/value store for hosting static files that automatically scales with demand.



Data Consistency on S3

  • Read after Write consistency for PUT requests of new objects;
  • This means that if you upload new files to S3, you will be able to read them immediately.
  • Eventual consistency for overwrite PUT and DELETE requests;
  • This means that if you update or delete files, you may still be able to GET the older version if you do that request immediately after updating/deleting.?
  • This is due to propagation delays (in seconds) for the changes to take effect.



AWS Guarantees for S3

  • Built for 99.99% availability;
  • This means that you multiply 99.99% (0.9999) by the number of seconds in a month to get the availability for the S3 service (about 2627737.2 sec/month = 729.927 hours/month).
  • Amazon guarantees 99.9% availability;
  • Amazon guarantees 99.999999999% durability for data on S3
  • This is called the eleven nines (11 9’s) in the industry.
  • This means that you will not loose that file uploaded to S3.



S3 Features

  • Tiered storage available;
  • Lifecycle management;
  • This means that you can manage in which tier files in S3 bucket go into after a period of time. This is useful to decrease cost of accumulated older data by transferring it to less performant tiers.
  • Versioning;
  • You can version control your files hence allowing you to restore previous versions.
  • Encryption;
  • You can encrypt your file at rest (and also on the fly, but that option is out the scope of the Cloud Practitioner exam).
  • You secure data using Access Control Lists (A.C.L) and Bucket Policies;
  • ACLs are used for individual files/objects to restrict access to some IAM users, groups or roles. For example, you allow access to the salaries.xls file only the the HR IAM group.
  • Bucket Policies work across entire buckets. For example, you can restrict access the HR bucket to the HR IAM group.



Amazon S3 Non-archival Storage Classes

Here are the different non-archival storage classes of S3:

  • S3 Standard:
  • This is the default storage class and is for frequently accessed data;
  • - 99.99% availability;
  • - 99.999999999% durability;
  • - stored redundantly across multiple Availability Zones;
  • - designed to sustain loss of two Availability Zones;
  • S3 Intelligent-Tiering;
  • - moves your data to the correct storage class based on usage;
  • - uses machine learning;
  • - optimizes cost by moving data to most cost-effective access tier;
  • - no performance imort, nor overhead.
  • S3 Standard-IA (S3-IA):
  • - for infrequently accessed data with the standard resilience;
  • - for data that requires rapid access for the rare times when needed;
  • - cheaper than S3 standard storage class.
  • S3 One Zone-IA;
  • - for infrequently access data
  • - only stored in one AZ, hence less resilient (no quick recovery).



Amazon S3 Glacier

  • Designed for archiving of data within S3 as separate storage classes;
  • Offers configurable retrieval times;
  • - not able to retrieve the data instantly.?
  • - data is in “cold storage”.
  • Can send files directly or through lifecycle rules in S3;
  • Many companies set rules in S3 to transfer data from S3 standard to Glacier storage class.
  • Provides two different storage classes:
  • - S3 Glacier;
  • - S3 Glacier Deep Archive;



Amazon S3 Glacier Storage Classes

  • S3 Glacier:
  • - Designed for archival data;
  • - 90 day minimum storage duration change;
  • - Can be retrieved in either minutes or hours;
  • - You pay a retrieval fee per GB retrieved;
  • - Over 5 times less expensive than S3;
  • - Standard storage class;
  • S3 Glacier Deep Archive:
  • - Designed for archival data;
  • - 180 day minimum storage duration change;
  • - Can be retrieved in hours (12 hours is acceptable);
  • - You pay a retrieval fee per GB retrieved;
  • - Over 23 times less expensive than S3 Standard storage class;






S3 Pricing

As usual with AWS, charges follow the pay-as-you-go model, no upfront charges. You are charged monthly.

By the way, you don’t need to know all this by heart. At the Cloud practitioner level, AWS does not ask that you to be an expert in the details of charges. I give you this information to add context when you see questions in the exam. Frankly some of these details are asked of you in higher level certifications like the AWS Certified Solutions Architect.

S3 provides billing reports.

You are charged for the following:

  • amount of storage:
  • - You pay for storing objects in S3 buckets;
  • - the rate depends on object size, duration of storage and storage class;
  • number of requests:
  • - you pay for requests like GET or PUT made against your S3 buckets and objects;
  • - you also pay for requests associated with lifecycle actions like transition objects to another storage class after some time;
  • - the rates for requests depend on the kind of request and the storage class;
  • storage management pricing:
  • - you pay for storage management features enabled on your buckets like S3 inventory, analytics and object tagging;
  • data transfer pricing:
  • You pay for data transfers in and out of S3 except:
  • - data transferred in from the internet (like when uploading files);
  • - data transferred out to an EC2 instance in the same region as bucket;
  • - data transferred out to CloudFront;
  • transfer acceleration;
  • cross region replication;

Charges for Storage Classes

  • S3 standard:
  • - you pay for objects stored
  • - no additional retrieval fees for objects
  • S3 Standard IA + One-zone IA:
  • You pay for:
  • - stored objects;
  • - retrieval fee
  • - deleting, overwriting or transitioning to other storage class before 30 days (to be clear, you must store files for minimum 30 days or you incur additional fees)
  • - minimum billable object size of 128 Kb (smaller objects will be billed at 128 KB);
  • S3 Intelligent Tiering:
  • - no additional fees for retrieving objects (except request fees);
  • You pay for:
  • - object stored;
  • - monthly monitoring and automation;
  • - deleting, overwriting or transitioning to other storage class before 30 days;
  • - minimum billable object size of 128 Kb (smaller objects will be billed at 128 kb);
  • S3 Glacier:
  • You pay for:
  • - objects stored
  • - retrieval fees according to speed of retrieval;
  • - requests per objects and per byte restored
  • - deleting objects before 90 day minimum storage commitment
  • - among other fees…
  • S3 Glacier Deep Archive:
  • You pay for:
  • - objects stored
  • - retrieval fees according to speed of retrieval (data retrieval times — the longer, the cheaper);
  • - requests per objects and per byte restored
  • - deleting objects before 180 day minimum storage commitment
  • - among other fees…

To see your bill, log with your root user account and go to the billing dashboard. There, you will be able to see all fees per region for S3.

Pfew that was a lot of fees for just one service…

But don’t forget that because of the economies of scale offered by AWS, most of these fees will be a few cents and don’t forget tp take advantage of your one-year free tier to test around and shut it down before reaching free usage limit.



S3 Transfer Acceleration

  • faster and secure transfers of files over long distances between users and S3 bucket;
  • takes advantage of Amazon CloudFront global network of edge locations;
  • data routed to S3 over optimized network path on Amazon own internal network (Yes, Amazon has its own “Internet” which is way faster than the general Internet );
  • users upload files to nearest edge location and than data is transferred to your S3 bucket using Amazon internal optimized network.



Cross Region Replication

When you upload files to S3 bucket 1, they are automatically replicated to S3 bucket 1.

This is useful for disaster recovery (DR)



Restricting Bucket Access

You can restrict access to a bucket using:

  • Bucket policies;
  • they apply to the whole bucket.
  • Object policies;
  • they apply to individual files.
  • IAM policies;
  • they apply to IAM users and groups;



S3 Use Cases

You can put any kind of files in S3. Storage is almost unlimited.

S3 common use cases are:

  • backup storage:
  • - provide storage for data backup services;
  • - write or copy backup files to S3;
  • - for example, create a script for copying SQL dumps to S3 as offsite backup;
  • media hosting:
  • - redundant, scalable and highly available storage to host videos, photos or music uploads and downloads;
  • - for example, a photo sharing website that uses S3 to store photos;
  • application assets:
  • - provide storage for your application data;
  • - for example, an application that uses S3 as a data store for read/write operations, or a build pipeline that stores your TypeScript transpilation artifacts;
  • data lake:
  • - enable organization to store all its data structured and unstructured in one centralized repository;
  • - use S3 used for data storage for low cost and durable storage
  • content delivery:
  • - use S3 for content that your customers can download;
  • - for example, a photographer stores their photos in S3 and clients access them for a fee.



Amazon EC2 File Storage?Services

  • Amazon EBS (Elastic Block Store)
  • Persistent block storage for use with Amazon EC2
  • Amazon EFS (Elastic File System)
  • Elastic file system for use with Linux-based workloads



Amazon Elastic Block Store (EBS)

Think of EBS as virtual disks in the Cloud.

EBS can create storage volumes and attach them to EC2 instances.

Once attached, you can use them to:

  • create file system;
  • run an operating system;
  • run a database;
  • and other use cases for virtual hard drives;

EBS volumes are placed in specific Availability zones where they are replicated for fault tolerance and disaster recovery. The EC2 instance to which the EBS volume is attached needs to be in the same availability zone.

  • Enables redundancy within an AZ;
  • Allows users to take snapshots of its data;
  • EBS volumes can be attached to EC2 instances and make snapshots of the data on these volumes. You can create new EBS volumes with snapshots.
  • Offers encryption of its volumes;
  • Not enabled by default. Can be enabled per EBS volume.
  • Provides multiple volume types
  • - General purpose SSD
  • - Provisioned IOPS SSD
  • - Throughput optimized HDD
  • - Cold HDD



Amazon EBS Volume Types

SSD (Solid State Drive):

  • General Purpose SSD (GP2):
  • - wide variety of workloads;
  • - balance between price and performance;
  • Provisioned IOPS SSD (IO1):
  • - IOPS means Input Output Per Second;
  • - highest performance SSD volume for mission-critical low latency or high throughput workloads (ex: high performance database);

Magnetic:

  • Throughput Optimized HDD (ST1):
  • - low cost;
  • - HDD (Hard Drive Disk) volume designed for frequently accessed, throughput-intensive workloads;
  • Cold HDD (SC1):
  • - lowest cost;
  • - HDD volume designed for less frequently accessed workloads (usually file servers);
  • Magnetic drive, previous generation for small volume sizes;



EBS Pricing

You pay for:

  • Volumes (on a per GB basis);
  • Snapshots (on a per GB basis);
  • Data Transfers.



Amazon Elastic File System (EFS) — do not confuse it with EBS!

It is very important not to confuse EFS with EBS.

Remember that EBS is IaaS (Infrastructure as a Service) because it provides virtual hard drives that you use for whatever use cases that you manage yourself whereas EFS would be PaaS (Platform as a Service) because it is:

  • Fully managed service;
  • No need to provision anything, the system handles scaling on its own.
  • Designed for Linux workloads;
  • Can be attached to on premise servers but most common use case is attaching to EC2 instances.
  • Supports up to petabyte scale;
  • Stores data across multiple AZ’s;
  • Provides two different storage classes:
  • - Standard;
  • - Infrequent access (IA);
  • Provides configurable lifecycle data rules to move data from one storage class to another after a set period.



Databases with?AWS

Do not confuse database services with storage services.



About Databases on AWS

Let’s recap the different types of databases:

Relational Databases (think Amazon Aurora or MySQL)

  • Scalable,
  • High Availability with Multi-AZ support,
  • Do not use relational databases when you don’t need joins or complex transactions, prefer NoSQL.

NoSQL Databases (think Amazon DynamoDB or MongoDB)

  • scalable,
  • High Availability with Multi-AZ support,
  • Do not use NoSQL databases when you need joins or complex transactions

For large binary files (image, audio, video, etc.) consider using S3 to store then.

Data Warehouse (think of Amazon Redshift)

  • scalable,
  • High Availability with Multi-AZ support,
  • Do not use a data warehouse for OLTP (OnLine Transaction Processing) — more on this in the Redshift section.

Search Databases (think (AWS CloudSearch or ElasticSearch)

  • scalable,
  • High Availability with Multi-AZ support.

Graph Databases (think Amazon Neptune)

  • scalable,
  • High Availability with Multi-AZ support.

Data Lakes (think of Amazon S3)

  • used to storage massive amounts of data in central location;
  • data stored as is, no predefined schema;
  • Data Lake is a storage repository that stores huge structured, semi-structured and unstructured data while Data Warehouse is blending of technologies and component which allows the strategic use of data (business intelligence).
  • you can use Amazon Athena to do SQL queries on S3.



AWS Databases & Related Services

We will talk about the following services:

  • Amazon RDS
  • Amazon Aurora
  • Amazon DynamoDB
  • Amazon Redshift
  • Amazon ElastiCache
  • AWS Database Migration Service



Amazon RDS (Relational Database Service)

  • Fully managed service for relational databases;
  • Handles provisioning, patching, backup, and recovery of your database;
  • Supports deployment across multiple availability zones (multi-AZ) for Disaster Recovery (DR);
  • - in case the master database fails, RDS will automatically redirect the connection string (which is a DNS name) to the standby copy (or copies) of the master database, in other AZ’s.
  • Some platforms support Read Replicas (for performance);
  • - useful to send read requests to read replicas of the database;
  • - there is no automatic fail-over to read replicas if the master database crashes;
  • - the writes on the master database are synchronously replicated to read replicas;
  • - you can have up to 5 read replicas per master database instance.
  • - you can get up to 15 read replicas when using Amazon Aurora.
  • Launches into a VPC;
  • Useful for networking rules configuration.
  • Provides both general purpose SSD and provisioned IOPS SSD drive options.

To increase performance, you can do all your writes to the master database and all reads to multiple read replicas that are synchronized with the master DB.



Available Amazon RDS Platforms

RDS supports the follwing database engines:

  • MySQL;
  • PostgreSQL;
  • MariaDB;
  • Oracle Database;
  • SQL Server;
  • Amazon Aurora;
  • Custom-made by Amazon enterprise-scale MySQL compatible.?
  • Marketed as less costly than traditional enterprise databases.



RDS Pricing

You are charged for:

  • clock hours of server time;
  • database characteristics (which platform, etc.);
  • database purchase type (which instance type?, etc.);
  • number of database instances;
  • provisioned storage (size in GB of database);
  • additional storage;
  • requests;
  • deployment types;
  • data transfers>



Amazon DynamoDB

  • Fully managed NoSQL database service;
  • Provides both key-value and document database;
  • Enables extremely low latency at virtually any scale;
  • Supports automated scaling based on configuration;
  • Offers in-memory cache with the DynamoDB Accelerator (DAX).

According to AWS, DynamoDB can handle more than 10 trillion requests per day and can support peaks of more than 20 million requests per second.



DynamoDB Pricing

You pay for:

  • provisioned throughput (write);
  • provisioned throughput (read);
  • indexed data storage.



Amazon Redshift

  • Scalable data warehouse service;
  • Supports petabyte scale warehousing of data;
  • Leverages high performance disks and columnar storage;
  • Offers the ability to fully encrypt contents;
  • Can provide isolation with a VPC;
  • Enables querying of exabytes of data in Amazon S3 using Redshift Spectrum.

Okay, let’s understand why you would use Redshift as opposed to RDS or DynamoDB.

You need to differentiate between OLTP (OnLine Transaction Processing) and OLAP (OnLine Analytical Processing).

What is?OLTP?

Online transaction processing shortly known as OLTP supports transaction-oriented applications in a 3-tier architecture. OLTP administers day to day transaction of an organization.

The primary objective is data processing and not data analysis

What is?OLAP?

Online Analytical Processing, a category of software tools which provide analysis of data for business decisions. OLAP systems allow users to analyze database information from multiple database systems at one time.

The primary objective is data analysis and not data processing.

KEY DIFFERENCE:

  • Online Analytical Processing (OLAP) is a category of software tools that analyze data stored in a database whereas Online transaction processing (OLTP) supports transaction-oriented applications in a 3-tier architecture.
  • OLAP creates a single platform for all type of business analysis needs which includes planning, budgeting, forecasting, and analysis while OLTP is useful to administer day to day transactions of an organization.
  • OLAP is characterized by a large volume of data while OLTP is characterized by large numbers of short online transactions.
  • In OLAP, data warehouse is created uniquely so that it can integrate different data sources for building a consolidated database whereas OLTP uses traditional DBMS (DataBase Management System like MySQL or MongoDB);

Basically, data warehousing was invented to be able to do data analysis away from production databases. Therefore doing complex analytics won’t impact the performance of production databases.

Redshift being a data warehouse, it is built to handle the complex queries for data analysis. It is used to pull very large and complex data sets for business intelligence and all sorts of analytics.

For more on OLAP vs OLTP, check here (out of scope of Cloud Practitioner exam).



Amazon ElastiCache

  • Fully managed in-memory data stores;
  • Supports both Memcached and Redis;
  • Provides low latency in response times;
  • Enables scaling and replicas to meet application demand;
  • Handles common use cases including
  • - Database layer caching;
  • - Session storage.

ElastiCache improves performance of Web apps by allowing them to retrieve data from faster, managed in-memory caches instead of just relying on slower disk-based databases (Amazon RDS or any hosted Database as a Service (DBaaS)).

This allows apps to reduce the load off of databases by reducing the number of requests to them.

The usual strategy is to cache the most frequent identical queries like landing on the homepage of a website.



AWS Database Migration Service

Used to securely migrate data into AWS for both:

  • homogeneous migrations;
  • This means that you migrate to the same database management system (ex: MySQL to MySQL).
  • heterogeneous migrations;
  • This means you migrate your existing database to another management system (ex: MySQL to Amazon Aurora).

It supports both modes of migration:

  • all at once
  • in a continual manner.



Application Integration Services



Amazon SNS (Simple Notification Service)

  • Fully managed pub/sub messaging service;
  • Pub/sub means that you are able to publish messages and subscribe to topics on that service.
  • More on Pub / Sub here.
  • Enables you to create decoupled applications;
  • Organized according to topics;
  • This means that you publish messages to topics and you subscribe to messages from specific topics.
  • Integrates with multiple AWS services
  • Provides end user notifications across SMS, email, and push notifications.



Example of Amazon SNS Architecture

In this example, there is a user that signs up for an online service.

We can have the sign up service publish a message to a specific SNS topic called user_signup.

You can then have a Lambda function executed as a result of that SNS message from that topic.

You can also have an SNS queue populated with the payload/content of the message.

You can finally have an email sent as a result of the message published to that topic.

In all this, the sign-up service does not know anything about the Lambda function, the SQS queue or the email.

We basically have here a decoupled application architecture.



Amazon SQS (Simple Queue Service)

  • Fully managed message queue service;
  • Enables you to build decoupled and fault tolerant applications;
  • Supports up to 256 KB data payload;
  • Allows messages to be store up to 14 days;
  • Provides two types of queues:
  • - Standard queue;
  • - FIFO queue (First In First Out); to keep the order in which messages are received when the consumer pull messages from the queue.



Example Amazon SNS and SQS Architecture

In this example, a user submits an order and there is a Web service that’s get called for that operation.

You could handle everything in this web service but you choose to decouple and create a fault-tolerant application.

So once the user submits an order, a message is send to an SNS topic named user_order.

From the SNS topic, we fan it out to a fulfillment queue and that queue goes and leverages an order fulfillment microservice running in an ECS cluster. This order fulfillment microservice could be an API communicating with the warehouse system to take incoming orders and ship them out.

You could also fan it out to an analytics queue with a Lambda function consumer that ingests data coming from the order into an analytics service.

If the analytics ingestion service or the fulfillment service fail, the orders are not lost. Instead, when the respective teams put these services back online, they will be able to pull order from the queues.

The queues add fault-tolerance to our architecture, no data is lost if the receiving services break because the queue store the messages.

There is the concept of dead-letter queue. If for some reason the system is unable to process some messages, they could be sent to a dead-letter queue which you would handle more manually (out of scope of Cloud Practitioner).



Management & Governance Services



  • AWS CloudTrail;
  • Enables operational auditing of your AWS account. Already covered above in the security section.
  • AWS CloudFormation;
  • Provides infrastructure as code capabilities for AWS.
  • AWS CloudWatch;
  • Enables monitoring and metrics on your AWS resources.
  • AWS Organizations;
  • Control governance and management across multiple accounts.



AWS CloudFormation

  • Managed service for provisioning infrastructure based on templates;
  • You create these templates or use download existing templates for your use cases and pass them to CloudFormation that will create the AWS resources declared in the templates.
  • Free, no additional charge;
  • You only pay for the resources provisioned based on the template.
  • Templates can be YAML or JSON;
  • Enables infrastructure as code (IaC);
  • I.a.C is a best practice no matter your cloud provider.
  • It allows to version control the infrastructure in Git repositories.
  • It helps remove any manual process for full automation of provisioning (less human errors and deterministic process).
  • Manages dependencies between resources;
  • When created resources depend on each other, CloudFormation handle this for you. For example, if a Lambda function depends on a S3 bucket.
  • Provides drift detection to find changes in your infrastructure;
  • This helps detect changes made to resources since their deployment through CloudFormation.

The output of the CloudFormation template is called a stack. It’s basically all the AWS resources created based on the template specifications.

Typically, CloudFormation could be used to setup short-lived stacks in order to save money by not having resources running all the time (if your use case supports that, of course).

For example, you could automatically launch a dev and test stacks early in the morning and have them destroyed in the evening.

Elastic Beanstalk uses CloudFormation behind the scenes.



Example CloudFormation YAML

The code below is placed into a CloudFormation Template?, it would create a S3 bucket named my-sample-s3-bucket.

Description: Creates an S3 bucket
Resources:
  SampleS3Bucket:
    Type: AWS::S3::Bucket
    Properties:
      BucketName: my-sample-s3-bucket        



AWS Quick Starts

Quick Starts are built by AWS solutions architects and partners to help you deploy popular technologies on AWS, based on AWS best practices for security and high availability.

These accelerators reduce hundreds of manual procedures into just a few steps, so you can build your production environment quickly and start using it immediately.

Each Quick Start includes AWS CloudFormation templates that automate the deployment and a guide that discusses the architecture and provides step-by-step deployment instructions.

On a per account basis.

Available at https://aws.amazon.com/quickstart



AWS Landing Zones

AWS Landing Zone is a solution that helps customers more quickly set up a secure, multi-account (starts with 4) AWS environment based on AWS best practices.

With the large number of design choices, setting up a multi-account environment can take a significant amount of time, involve the configuration of multiple accounts and services, and require a deep understanding of AWS services.

This solution can help save time by automating the set-up of an environment for running secure and scalable workloads while implementing an initial security baseline through the creation of core accounts and resources. It also provides a baseline environment to get started with a multi-account architecture, identity and access management, governance, data security, network design, and logging.

Version 2.3.1 of the solution uses the most up-to-date Node.js runtime. Available at https://aws.amazon.com/solutions/aws-landing-zone/



Recap AWS Quick Starts VS AWS Landing Zones

AWS Quick Starts:?

for deploying environments quickly?, using CloudFormation templates built by AWS Solutions Architects who are experts in that particular technology

AWS Landing Zones:

for quickly setting up a secure, multi-account AWS environment based on AWS best practices. Starts with 4 accounts.



Amazon CloudWatch

  • Monitoring and management service (per region);
  • Collects logs, metrics, and events from most AWS services;
  • Most services publish some data into CloudWatch.
  • Enables alarms based on metrics;
  • For example, you could set an alarm if your API in API Gateway keeps returning 500 HTTP errors.
  • Provides visualization capabilities for metrics;
  • Allows for custom dashboards based on collected metrics;

CloudWatch monitors Amazon services as well as the applications that you launch on AWS (you can create custom metrics).

CloudWatch with EC2:

  • monitors EC2 every 5 minutes by default (this can lowered to 1 minute intervals by turning on detailed monitoring).
  • host level metrics (CPU, Network, Disk, status check)

You can send any metrics to CLoudWatch just by writing scripts that communicate with CloudWatch.

You can create CloudWatch alarm that trigger notifications and/or actions.

CloudWatch is about monitoring performance of resources and applications on AWS.



AWS Config

  • provides an inventory of your AWS resources.
  • provides a history of configuration changes to these resources.
  • shows how resources are related to one another.
  • shows how relationships between resources changed over time.
  • used to define rules that evaluate these configurations for compliance.

If you are asked about configuration change, think about AWS Config (like changing a port number in a Securiry Group or whatever similar).



Tagging and Resource groups

Tags are key/value pairs attached to AWS resources.

They are used for metadata (data about the data).

They can be inherited, for example when you tag a launch configuration of an auto scaling group, the new EC2 instances inherit the tags from that launch configuration.

Resource groups are used to group resources based on their tags.

Using resource groups, you can apply automation to tagged resources. For example, update all EC2 instances in a region with a specific tag.

Resource groups in combination with AWS Systems Manager allow to execute automation against entire fleets of AWS resources at the push of a button.

Tag editor which allows you to find tagged resources is a global service and also allows to add tags.

Newer regions may not be visible at the start in existing services like Tag editor.



AWS Organizations

  • account management service;
  • allows to consolidate multiple AWS accounts in one organization;
  • centrally managed;
  • Two features:
  • - consolidated billing;
  • - all features;

Multiple AWS accounts are used in companies with different teams.

Having just one account (with multiple IAM users) for an entire company is not recommended (think separation of concerns and security — if that account were to be compromised the entire company would be too).

So, in an AWS organization, you have a root account (base account) and organizational units (O.U).

Theses O.U’s could be different departments of your company. You attach one or multiple AWS accounts to these O.U’s.

You can apply policies to these O.U’s to restrict what the AWS accounts inside them can do (what services they can access or use) with their accounts. You can also attach the policies directly to the accounts.

With AWS organizations turned on, you benefit from the economy of scale, meaning the more you use the less you pay. The more accounts you use, the more you can get cheaper rates.

If you only use AWS Organizations consolidated billing feature:

  • You have a paying account which is independent, it cannot access resources of other accounts;
  • you have linked accounts which are independent;
  • with consolidated billing, you get one bill for all accounts (limited to 20 accounts but possible to increase);
  • track charges and allocate costs;
  • volume pricing discount;



Best Practices with AWS Organizations

  • always enable MFA (Multi-Factor Authentication) for root account;
  • use strong and complex password for root account;
  • paying account used only for billing purpose, create separate accounts to deploy AWS resources;

With CloudTrail, is a per account and per region service so you have to turn it on for all regions and accounts in order to consolidate all the logs in a S3 bucket:

  • turn CloudTrail in the paying account?;
  • create bucket policy that allows cross account access;
  • turn on CloudTrail in all the other accounts in the AWS organization
  • use the bucket in the payinf account

Basically, you push all the CloudTrail logs from all account into the paying account S3 bucket.

This bucket will serve as the source of truth about what’s going on the all the AWS organization.

Billing Alerts

When monitoring is enabled on the paying account, the billing data for all linked accounts is included.

You can still create billing alerts per individual accounts.

Consolidated Billing allows to get discounts on all your account.

Unused Reserved Instances for EC2 are applied across the group.



AWS Acceptable Use Policy

The AWS Acceptable Use Policy defines prohibited uses of the services offered by AWS. All users of the platform are bound by this policy.

For example, you will get in trouble if you use AWS to send spam emails.

You are prohibited to circumvent security measures that AWS has put in place.

Don’t think you are smarter than the thousands of talented engineers working for AWS, it’s not worth the trouble.

If you enjoy hacking and finding vulnerabilities, why not become a Cloud Security Expert and make that (plenty) money legally?? AWS has specialty certifications for that path.



AWS Marketplace

  • Curated catalog of third-party solutions for customers to run on AWS;
  • Provides AMI’s, CloudFormation stacks, and SaaS based solutions;
  • Enables different pricing options to overcome licensing in the cloud;
  • Charges appear on your AWS bill.



AWS Large Scale Data Transfer?Services



AWS Snowball:

Service to physically migrate petabyte scale data to AWS.

- uses secure appliances to transfer large amount of data into and out of AWS cloud;

Snowball Pricing

  • Service fee per job:
  • - Snowball 50TB = $200;
  • - Snowball 80TB = $250;
  • Daily charge:
  • - first 10 days free then $15/day;
  • Data Transfer:
  • - data transfer in S3 is free, data transfer out is not;
  • AWS Snowmobile;
  • Service to physically migrate exabyte scale data onto AWS.
  • A ruggedized shipping container brought to your data center by a trailer truck. It is loaded with your data and then gets back to AWS to be loaded onto the Cloud.



Analytics on?AWS



AWS Athena

Amazon Athena is a fast, cost-effective, interactive query service that makes it easy to analyze petabytes of data in S3 with no data warehouses or clusters to manage.

  • interactive query service enabling you to analyze and query data located in S3 using standard SQL
  • serverless,
  • pay per query / per TB scanned,
  • no need for Extract/Transform/Load (E.T.L) processes,
  • works directly with data in S3.
  • used to query log files stored in S3 (ex: ELB logs, S3 access logs, etc.).
  • used to generate business reports on data stored in S3.
  • used to analyze AWS cost and usage reports.
  • runs queries on click-stream data.



AWS Macie

About Personally Identifiable Information (PII)

  • personal data used to establish your identity,
  • could (and most likely is) exploited by criminals in identity theft and financial fraud (for sure),
  • Is considered PII:
  • - home address, email, SSN (Social Security Number),
  • - passport number, drivers license number,
  • - date of birth (D.O.B), phone number, bank account and credit card number.
  • - etc.

Macie is a security service that uses Machine Learning and Natural Language Processing (NLP) to discover, classify and protect sensitive data stored in S3.

  • uses AI to recognize sensitive data in S3 objects such as PII,
  • gives dashboards, reporting and alerts,
  • can also analyze CloudTrail logs;
  • used for PCI-DSS (Payment Card Industry Data Security Standard) compliance and preventing identity theft.



Preparing to Take the?Exam



Signing Up for the Exam

Go to aws.training and sign in with your AWS / Amazon account.

Once you clicked on Scheduled New Exam, you will get to a page where there is a list of AWS certifications.

Click on the links to either schedule the exam with Pearson Vue or PSI.

Note:

since March 2020, all AWS certification exams are available to be taken online with Pearson Vue.



Certification Areas of Focus

  • Cloud Concepts;
  • Security;
  • Billing / Pricing;
  • Technology;



Reviewing Cloud Concepts

  • Review how cloud platforms differ from traditional data centers;
  • Review how AWS organizes its infrastructure globally;
  • Understand how scalability differs in the cloud from traditional data centers;
  • Review CapEx and OpEx expenditures;



Reviewing Security

  • Understand the Shared Responsibility Model from AWS;
  • Review highlighted best practices for securing your AWS account & resources;
  • Review options for securing traffic within a VPC;
  • Review IAM and identity types;
  • Understand Least Privilege Access;



Reviewing Billing & Pricing

  • Review tools that help you understand AWS costs;
  • Understand the most cost-effective ways to leverage core services;
  • Review how costs differ from traditional data centers;
  • Review ways that organizations can manage and review costs;
  • Understand different support plan levels;



Reviewing Technology

  • Write down AWS services we covered and a summary of each;
  • Implement basic solutions using the services we covered;
  • And do not forget to stop the services right after you are done.
  • Review architectural principles for fault tolerance & high availability;
  • Analyze scalability approaches;



Taking the?Exam



Testing Best Practices

  • Take time to analyze each question for its intent;
  • Review what is required for the answer on each question;
  • Skip a question if it takes too much time Leverage the review capability;
  • Guess if you don’t know the answer after the review phase;
  • Examine the clock after each 10 questions;



More resources

If you want and need more practice, I recommend the following videos courses:

  • A Cloud Guru — AWS Certified Cloud Practitioner 2020 (my article covers more than that course — but still useful for the practical labs…);
  • Linux Academy — AWS Cloud Practitioner (CLF-C01) (more details);
  • AWS Cloud Practitioner Essentials (Second Edition) (Free AWS digital course — more an introduction than a full preparation);

Read the whitepapers recommended on the exam preparation page (services overview, architecting on AWS, pricing on AWS). This will help you better understand the context of the exam questions. I would even go so far as saying reading them is more important than watching courses. The video courses are very interactive but the whitepapers are more detailed.

I repeat read the damn whitepapers, you will thank me later?!?

(Tip: you can generate a MP3 from the PDFs and read while listening).

I would like to cover more but this article is already long enough. To continue your preparation, check the courses above and their practical labs (learning by doing.

If you have arrived here congratulations, you now have a deep overview about what is covered in the exam. Take one of the above video courses and you will be ready to pass that certification with ease.

I hope this article was very useful and wish you success on your exam.

Now go schedule and pass that exam to start your journey toward AWS Mastery!



Want more on #AWS #JavaScript #NodeJS #MongoDB #Go #DevOps #Python??

Read on here:



Florian GOTO — Medium

Read writing from Florian GOTO on Medium. Every day, Florian GOTO and thousands of other voices read, write, and share…medium.com

My courses:

RESTful Web API Design with Node.js 12 [Video]

Hands-On Web Development with TypeScript and Nest.js [Video]

Debbie Jones

3x AWS Certified. AWS Solutions Architect Professional AWS Community Builder (3rd Year)

3 年

Congratulations Florian GOTO ??

Jon Bonso

Co-Founder @ TutorialsDojo.com | Linkedin Top Voice | AWS Community Builder | 10x AWS Certified

3 年

Congratulations, Florian! Keep the momentum going.

要查看或添加评论,请登录

Florian GOTO的更多文章

社区洞察

其他会员也浏览了