Learning Path: AWS: AWS Environments with AWS Lambda
Packt’s Video Learning Paths are a series of individual video products put together in a logical and stepwise manner such that each video builds on the skills learned in the video before it.
Amazon Web Services (AWS) provides trusted, cloud-based solutions to help you meet your business needs. Running your solutions in the AWS Cloud can help you get your applications up and running faster while providing the security to meet your compliance requirements. Amazon Lambda is the part of AWS that lets you run your code without provisioning or managing servers. Amazon Lambda is a compute service that enables you to deploy applications and backend services that operate with zero upfront cost and require no system administration.
This learning path begins by showing you how to design robust large infrastructures using AWS. We will tackle the key capabilities to architect and host applications, websites, and services on AWS. We will see the available options for virtual instances and demonstrate launching and connecting to them. We will then design and deploy networking and hosting solutions for large deployments. Next, we will show you how to program AWS Lambda with Node.js, Java, Python, and C#. Finally, we will learn how to deploy and test Lambda functions, and how to set up and use the serverless framework.
Start moving your business to the cloud by leveraging the skills this Learning Path promises to deliver.
The goal of this Learning Path is to equip you with skills to leverage the great many promises of AWS.
This Learning Path is authored by some of the best in their fields.
About the Authors
Wayde Gilchrist started moving customers of his IT consulting business into the cloud and away from traditional hosting environments in 2010. In addition to consulting, he delivers AWS training for Fortune 500 companies, government agencies, and international consulting firms. When he is not out visiting customers, he is delivering training virtually from his home in Florida.
Markus Klems is an expert on software development and system administration for scalable, high-availability, and high-performance software systems, such as big data, mobile, web application, and SaaS systems. In the context of his research and development work at TU Berlin and Karlsruhe Institute of Technology (KIT), Markus has gained in-depth knowledge and experience with complex and large-scale IT systems. Markus has been working with Amazon Web Services (AWS) since 2008 and is particularly excited about emerging technology trends in the realms of serverless computing and serverless microservice architectures.
Designing AWS Environments
This video gives an overview of the entire course.
In order for the student to follow along with the on-screen examples, they should open up a free AWS Account.
For the first year of your AWS Account, there are many things you can do for free. We will discuss what these are and how to avoid accruing any charges.
The AWS Management Console is the easiest way to launch AWS services. In this video we show you how to navigate the console, access your billing information, and switch regions.
How to launch an EC2 instance from the AWS Management Console.
AWS EC2 instances are available in several types and also various sizes. To get optimum performance and cost, you need to select the correct type and size instance for your application.
There are several types of storage volumes we can use for our EC2 instances. We need to understand the significant differences and trade-offs.
It is very important to keep our instances safe from attacks. Security groups give us a way to protect our instances with firewall rules. These define what type of traffic will be allowed in and out of the instance.
Logging in to an EC2 instance requires that you create a key pair, specify the name of the key pair when you launch the instance, and provide the private key when you connect to the instance.
To connect to EC2 Linux instances, we use SSH and authenticate with a private key. However, the process is different from Windows and Mac/Linux. To other users, to connect requires creating more key pairs.
To connect to EC2 Windows instances, we use RDP and the administrator password. To obtain the password, we need to decrypt it first with the private key.
Defining a Virtual Private Cloud (VPC) on AWS begins with selecting an IP Address block for the instances that will run in the VPC. This requires an understanding the CIDR notation and the valid private IPv4 addresses ranges.
When you launch an EC2 instance into a VPC, it will be assigned a private IP address. If you want the instance to be reachable from the Internet, you will need to assign it a public or elastic IP address.
Every VPC must contain one or more subnets. Subnets can be configured to be either public or private, depending on whether their instances need to be reachable from the Internet.
VPCs allow you to launch instances into a private network space. There are three primary ways to obtain a VPC including using a pre-defined Default VPC, building your own with the VPC wizard, and creating a completely custom VPC from scratch.
The default VPC will require a lot of modification to be able to provide the level of security we need to protect our instances. The solution is to build our own custom VPC with private subnets and custom route tables.
Once we have a VPC and some private or public instances, we need to be able to securely to connect those instances from outside the VPC. This requires attaching one or more gateways and establishing a secure connection between our data center.
Relying solely on Security Groups for our firewall increases the likelihood that an accidental misconfiguration could leave our databases and other private resources exposed to hackers. Best security practice mandates that we should backup our security groups with an additional layer of security.
Regions on AWS are divided into two or more distinct locations known as Availability Zones (AZs). With the proper architecture, we can leverage multiple AZs to give our applications high availability.
Learning AWS Lambda
This video provides an overview of the entire course.
This video will help you in creating and setting up AWS account.
Learn about AWS usage and pricing models.
We are going to explore the AWS Management Console.
Create a simple Lambda function from a blueprint on the AWS Management Console.
Learn how to create a REST API and how to connect your API to a Lambda function.
We install the serverless framework and try out the command-line interface (CLI).
Learn how to create a project with the serverless framework.
We are going to write a Lambda function handler using Node.js and learn about the event, context, and callback objects.
Learn different techniques and tools for testing and debugging your Lambda function handler code and API.
Learn how to build a simple web application using the serverless framework and Node.js.
We want to make our web application stateful. Therefore, we need a database. We use AWS DynamoDB to build a stateful serverless backend.
How do you deploy the frontend? In the first step, we deploy the frontend on S3. Then, we deploy the S3 bucket on CloudFront edge locations for improved performance in different geographic regions.
We will explore the AWS Toolkit for Eclipse and use it to create a boilerplate Java Lambda function.
We are going to deploy and run a Lambda function from Eclipse. Then we will review the function on the AWS Management Console.
We create and test a Lambda function that can be triggered through an S3 event.
We are going to create a serverless Java project in Eclipse and deploy it to AWS. The project consists of two Lambda functions that use DynamoDB and S3 for data storage and retrieval.
We will create our first Python Lambda function from a blueprint in the AWS Management Console.
We will use the serverless framework to create a Python function from a template.
We will create a simple CRUD web application with Lambda, API Gateway, and DyanmoDB—using the serverless framework and Python.
We will explore the AWS Toolkit for Visual Studio and use it to create a boilerplate C# Lambda function.
We will use the AWS Toolkit for Visual Studio to create a Serverless Project with C# Lambda functions.