Lambda Flashcards
T or F
Lambda is a computer service where you can upload your code and create a Lambda function.
True
T or F
Lambda takes care of provisioning and managing servers that you use to run the code.
true
T or F
With Lambda, you don’t have to worry about operating systems, patching, scaling, etc. You cna use Lambda in the following ways.
True
T or F
As an event driven compute service where AWS Lambda runs your code in response to events. These events could be changes to data in an AWS bucket or an AZ dynamoDB table.
True
T or F
As a compute service to run your code in response to HTTP requests using API GW or API calls made using AWS SDKs.
True
What languages does Lambda use?
- nodejs
- java
- python
- C#
- Go
All of the above
Pricing
T or F
of requests
first 1 million requests are free.
$.20 per 1 million requests thereafter
Duration is calculated from the time your code begins executing until it returns or otherwise temrinates, rounded up to the nearest 100ms. The price depends on the amount of money you allocate to your function. You are charged .00001667 for every GB-second used.
True
Why Lambda?
- no servers
- continuous scaling
- super cheap
all of the above
T or F
Lambda scales up not out automatically.
False
Lambda scales out (not up) automatically
T or F
Lambda functions are independent, 1 event = 1 function
True
T or F
Lambda is serverless
True
T or F
Lambda functions cannot trigger other lambda functions
false.
Lambda functions can trigger other lambda functions, 1 event can = x functions if functions trigger other functions.
T or F
Lambda can do things globally. You can use it to back up S3 to other S3 buckets.
true
WHen you use _____ in Lambda, you can publish one or more versions of your Lambda function. AS a result, you can work with different variations of your Lambda function in your development workflow, such as development, beta, and prod. Each Lambda function version has a unique ARN. After you publish, it is immutable (can’t be changed)
versioning
AWS Lambda maintains your latest function code in the ______ version. When you update your function code, AWS Lambda replaces the code in teh ____ version of teh Lambda code.
$LATEST
$LATEST
You can refer to this function using its ______. There are 2 _____ associated with this internal version.
ARN and ARNs
This function ARN wiht the version suffix
arn:aws:lambda:aws-region:acct-id:function:helloworld:$LATEST
Qualified ARN
The function ARN without the version suffix:
arn:aws:lambda:aws-region:acct-id:function:helloworld
Unqualified ARN
After initially creating a Lambda function (the $LATEWT version), you can publish a version 1 of it. By creating an _____ named PROD that points to version 1, you can now use the PROD alias to invoke version 1 of the Lambda function.
ALIAS
How do you update Lambda’s in production.
You can update the code (the $LATEST version) with all of your improvements and then publish another stable version (V2). You can promote V2 to prod by remapping the PROD alias so that it paints to V2. If you find something wrong, you can easily roll back the prod version to V1 by remapping the PROD alias so that it points to V1.
T or F
You can have multiple versions of Lambda functions
True
T or F
The latest version of your Lambda will use $LATEST
True
T or F
Qualified version will not use $LATEST, but the unqualified will use it.
False
The qualified version will use $LATEST, unqualified will not use it.
T or F
Versions are immutable (can’t be changed)
True
T or F
You can split traffic using alias to diff version
True
T or F
you can’t split traffic with $LATEST, instead crete an alias to $LATEST
true
This allows you to visualize and test your serverless apps.
Steps Functions
_____ provides a graphical console to arrange and visualize the components of your app as a series of steps. This makes it simple to build and run multistep apps.
Step Functions
_____ auto triggers and tracks each step and retries when there are errors, so your app executes in order and as expected. They also log the state of each step, so when things do go wrong, you can diagnose and debug problems quickly.
Step functions.
T or F
Step functions are a great way to visualize your serverless application
True
T or F
Step functions automatically trigger and tracks each step
True
T or F
Step functions log the state of each step, so if something goes wrong, you can track what went wrong and where.
True
concurrent executions
- not necessary to memorize lots of limits for the exam
- be aware that tehre i a concurrent execution limit for lambda
- safety faeture to limit the number of concurrent executions across all functions in a given region pre account.
yes
concurrent executions
default is _____ per region
TooManyRequestException
HTTP Status Code: ____
Request throughput limit exceeded
1000
429
concurrent executions
- if you have many lambda functions running in teh same region and you suddenly start seeing new invocation requests being rejected, then you may have hit your limit.
- at ACG, our daily usage is around 6.5m Lambda invocations per day in us-east-1
- request an increase on this limit by submitting a request to the aws support center
- ____ ____ guarantees that a set number of executions which wil always be available for our critical function, however this also acts as a limit.
reserved concurrency
Lambda versions
- when you create a lambdad functioin, there is only one version: $LATEST
- when yoou upload a new version of the code to lambda, this version will become $LATEST
- you can create multiple version of your function code and use aliases t referernce the version you want to ues as part of the ARN
- IN develoopment you might want to maintain a few versionns of the same function as you develop and test your code
- an alias is like a pointer to a specific veersion of the funciton code
yes
if ou upload hte new code to lambda, the new code becomes the $LATEST version
T
if your appuses an alias, remember to update the ARN that you are using if you want to use te new code
T
enabling lambda to access VPC resources
- to enable this, you need to allow the function to connect to the private subnet
- lambda needs the following VPC configuration info so that it can connect to the VPC::
private subnet id
security group ID (with required access)
lambda uses this info to setup ENIs using an available IP address from your private subnet