1. Home
  2. Training Library
  3. Amazon Web Services
  4. Courses
  5. Foundations for Solutions Architect Associate on AWS

AWS Lambda

Contents

keyboard_tab
Introduction
1
Overview
PREVIEW1m 23s
2
Terminology
PREVIEW12m 34s
Services at a Glance
play-arrow
Start course
Overview
DifficultyBeginner
Duration3h 8m
Students9500
Ratings
4.8/5
star star star star star-half

Description

The ‘Foundations for Solutions Architect–Associate on AWS’ course is designed to walk you through the AWS compute, storage, and service offerings you need to be familiar with for the AWS Solutions Architect–Associate exam. This course provides you with snapshots of each service, and covering just what you need to know, gives you a good, high-level starting point for exam preparation. It includes coverage of:

Compute
Amazon Elastic Cloud Compute (EC2)
Amazon EC2 Container Service (ECS)
AWS Lambda
Amazon Lightsail
Amazon Batch

Storage and Database
Amazon Simple Storage Service (S3)
Amazon Elastic Block Store (EBS)
Amazon Relational Database Service (RDS)
Amazon Glacier
Amazon DynamoDB
Amazon Elasticache
Amazon Redshift
Amazon Elastic MapReduce (EMR)

Services
Amazon Simple Queue Service (SQS)
Amazon Simple Notification Service (SNS)
Amazon Simple Workflow Service (SWF)
Amazon Simple Email Service (SES)
Amazon CloudSearch
Amazon API Gateway
Amazon AppStream
Amazon WorkSpaces
Amazon Data Pipeline
Amazon Kinesis
Amazon OpsWorks
Amazon CloudFormation

Course Objectives

  • Review AWS services relevant to the Solutions Architect–Associate exam
  • Illustrate how each service can be used in an AWS based solution

Intended Audience

This course is for anyone preparing for the Solutions Architect–Associate for AWS certification exam. We assume you have some existing knowledge and familiarity with AWS, and are specifically looking to get ready to take the certification exam.

Pre-Requisites

If you are new to cloud computing I recommend you do our introduction to cloud computing courses first. These courses will give you a basic introduction to the Cloud and with Amazon Web Services. We have two courses that I recommend - What is Cloud Computing?  and  technical Fundamentals for AWS

The What is Cloud Computing? lecture is part of the Introduction to Cloud Computing learning path. I recommend doing this learning path if you want a good basic understanding of why you might consider using AWS Cloud Services. If you feel comfortable with Cloud, but would like to learn more about Amazon Web Services, then recommend completing the technical Fundamentals for AWS course to build your knowledge about Amazon Web Services and the value the services bring to customers. 

If you have any questions or concerns about where to start please email us at support@cloudacademy.com so we can help you with your personal learning path. 

Ok so on to our certification learning path! 

Solution Architect Associate for AWS Learning Path 

This Course Includes:

  • 7 video lectures
  • Snapshots of 24 key AWS services

What You'll Learn

Lecture Group What you'll learn
Compute Fundamentals Amazon Elastic Cloud Compute (EC2)
Amazon EC2 Container Service (ECS)
AWS Lambda
Storage Fundamentals

Amazon Simple Storage Service (S3)
Amazon Elastic Block Store (EBS)
Amazon Relational Database Service (RDS)
Amazon Glacier
Amazon DynamoDB
Amazon Elasticache
Amazon Redshift
Amazon Elastic MapReduce (EMR)

Services at a Glance

Amazon Simple Queue Service (SQS)
Amazon Simple Notification Service (SNS)
Amazon Simple Workflow Service (SWF)
Amazon Simple Email Service (SES)
Amazon CloudSearch
Amazon API Gateway
Amazon AppStream
Amazon WorkSpaces
Amazon Data Pipeline
Amazon Cognito
Amazon Kinesis
Amazon OpsWorks
Amazon CloudFormation

 

If you have thoughts or suggestions for this course, please contact Cloud Academy at support@cloudacademy.com.

Transcript

Hello and welcome to this lecture where we shall take an introductory look at AWS Lambda.

The first point to make about AWS Lambda is that it's a service that lets you run your own code in response to events in a scalable and highly available serverless environment but what does serverless mean?

Essentially serverless means that you do not need to worry about provisioning and managing your own compute resource to run your own code. Instead, this is managed and provisioned by AWS. AWS will start, scale, maintain, and stop the compute resources required for as long as you need them, which can be as short as a few milliseconds depending on your Lambda function.

I'll cover more Lambda functions as we go through this lecture.

Although it's named serverless, it does of course require servers or at least computer power to carry out your code requests but because the AWS user does not need to be concerned with what compute power is used or where it comes from, it's considered serverless from the user perspective.

More information on serverless computing can be found within our existing course 'What is Serverless Computing' within the 'Getting Started with Serverless Computing' learning path.

Now we have a high level overview of what AWS Lambda is. Let's look at what it can be used for. AWS Lambda is great for a number of different use cases when you need to run and execute code in response to event-driven triggers. This makes it easy to build applications that will respond quickly to new information in addition to automating processes in existing applications and services.

For example, you could create a Lambda function to execute every time an image is uploaded to a particular bucket in S3, which will then compress the image into a zip format. This function will be triggered upon a PUT request to the bucket.

If you are proficient in writing in any of the supported languages of Lambda, which at the time of writing this course are Node.js, Java, C#, and Python, then you can create advanced event-driven processes within your environment. If you'd like additional examples and use cases of AWS Lambda, please take a look at the link on the screen.

One big difference between the compute power used for Lambda and that of EC2 for example is that with EC2, you are charged for that compute power by the hour, however, with AWS Lambda, you are only charged for the compute time used to the closest 100 milliseconds plus the number of request triggered by your function making this a very cheap compute option for running event-driven code.

Now let's take a look at how we can configure this service and understand some of the components, which will allow us to get a better understanding of how it works. For example, how AWS Lambda knows what compute resource it should use.

Let's start by defining what a Lambda function is. A Lambda function contains your code that you have written to perform the required task plus any dependencies for that code. In addition to this, the function also includes a number of configurational details, which are defined when a Lambda function is created.

  • The required resources. The required resources provides just that, the resources that are required to carry out the execution of the code, however, the only input we have is to specify the amount of RAM required. The compute power is then determined by AWS Lambda using a ratio related to the amount of RAM specified.
  • Maximum execution timeout, this specifies the maximum amount of time the Lambda function will run before it's terminated.
  • IAM role, this grants the Lambda the appropriate permissions to carry out the execution of the code.
  • Handler name, this refers to the method in your code where the execution of the function starts. When the function is triggered, any event information is passed as a parameter to the handler method.
  • There is another key element of AWS Lambda, and that is defining the trigger that invokes the AWS Lambda function itself.

When creating a new Lambda function via the AWS Management Console, you are asked to define the trigger prior to either uploading or creating your code for the function. These triggers or event resources can be via another AWS service such as S3, DynamoDB, CloudFront, or by invoking the function on demand.

For a full list of event-driven resources, please see the following link.

At a high level, the configuration steps for creating an AWS Lambda function via the AWS Management Console is as follows. Firstly, select a blueprint. AWS Lambda provides a large number of common blueprint templates, which are preconfigured Lambda functions. To save time on your own code, you can select one of these blueprints, and then customize it as necessary. An example of one of these blueprints is S3-get-object, an Amazon S3 trigger that retrieves metadata for the object that is being updated.

Next, configure triggers. As I just explained, you are asked to define the trigger for the Lambda function. Using an example from step one, you would be required to answer a number of configurational questions relating to S3 such as specifying which S3 bucket the function will run on.

Configure the function, this section requires you to either upload your code or edit in line. This section also requires you to define the required resource, maximum execution timeout, the IAM role, and the handler name.

Once all this information has been entered, your AWS Lambda function has been created. The key benefit of using AWS Lambda is that it is a highly scalable serverless service coupled with fantastic cost optimization compared to EC2 as you are only charged for compute power whilst the code is running and for the number of functions called.

For your own hands-on experience with AWS Lambda, take a look at our labs, which will guide you through how to create your first Lambda function: Introduction to AWS Lambda, Automating EBS Snapshots with AWS Lambda, and Process Amazon S3 Events with AWS Lambda.

That now brings us to the end of this lecture covering AWS Lambda. Coming up in the next lecture, I shall discuss AWS batch.

About the Author

Students61521
Courses90
Learning paths38

Andrew is an AWS certified professional who is passionate about helping others learn how to use and gain benefit from AWS technologies. Andrew has worked for AWS and for AWS technology partners Ooyala and Adobe.  His favorite Amazon leadership principle is "Customer Obsession" as everything AWS starts with the customer. Passions around work are cycling and surfing, and having a laugh about the lessons learnt trying to launch two daughters and a few start ups.