
Explore serverless computing, where cloud providers allocate resources on demand and manage servers. Examine how compute, functions, integration tools, and storage like S3 fit into serverless architectures.
Explore how the serverless framework builds lambda-based apps with a function and event. Compare it to other infrastructure as code tools and view AWS, Azure, and GCP event triggers.
Explore the main disadvantages of serverless, including cold-start performance, time and memory limits, basic monitoring, security concerns, and vendor lock-in with proprietary tools.
Run code snippets without provisioning servers by using Lambda as a compute service, highlighting auto scaling, pay-per-use pricing, no charges when idle, and consistent performance as requests grow.
Identify the function, the event, and the trigger that invoke a lambda function. A trigger is a resource that calls the lambda, with API gateway as the most common example.
Create your first lambda function in the AWS console, attach a basic execution role, test with a sample event, and review dotNet or Java runtimes and CloudWatch logs.
In the general configuration, set the lambda function's memory from 128 to 10 TV and adjust the timeout from the default three seconds up to a maximum of 15 minutes.
Reserved environment variables
_HANDLER – The handler location configured on the function.
_X_AMZN_TRACE_ID – The X-Ray tracing header.
AWS_REGION – The AWS Region where the Lambda function is executed.
AWS_EXECUTION_ENV – The runtime identifier, prefixed by AWS_Lambda_—for example, AWS_Lambda_java8.
AWS_LAMBDA_FUNCTION_NAME – The name of the function.
AWS_LAMBDA_FUNCTION_MEMORY_SIZE – The amount of memory available to the function in MB.
AWS_LAMBDA_FUNCTION_VERSION – The version of the function being executed.
AWS_LAMBDA_INITIALIZATION_TYPE – The initialization type of the function, which is either on-demand or provisioned-concurrency. For information, see Configuring provisioned concurrency.
AWS_LAMBDA_LOG_GROUP_NAME, AWS_LAMBDA_LOG_STREAM_NAME – The name of the Amazon CloudWatch Logs group and stream for the function.
AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN – The access keys obtained from the function's execution role.
AWS_LAMBDA_RUNTIME_API – (Custom runtime) The host and port of the runtime API.
LAMBDA_TASK_ROOT – The path to your Lambda function code.
LAMBDA_RUNTIME_DIR – The path to runtime libraries.
TZ – The environment's time zone (UTC). The execution environment uses NTP to synchronize the system clock.
The following additional environment variables aren't reserved and can be extended in your function configuration.
Unreserved environment variables
LANG – The locale of the runtime (en_US.UTF-8).
PATH – The execution path (/usr/local/bin:/usr/bin/:/bin:/opt/bin).
LD_LIBRARY_PATH – The system library path (/lib64:/usr/lib64:$LAMBDA_RUNTIME_DIR:$LAMBDA_RUNTIME_DIR/lib:$LAMBDA_TASK_ROOT:$LAMBDA_TASK_ROOT/lib:/opt/lib).
NODE_PATH – (Node.js) The Node.js library path (/opt/nodejs/node12/node_modules/:/opt/nodejs/node_modules:$LAMBDA_RUNTIME_DIR/node_modules).
PYTHONPATH – (Python 2.7, 3.6, 3.8) The Python library path ($LAMBDA_RUNTIME_DIR).
GEM_PATH – (Ruby) The Ruby library path ($LAMBDA_TASK_ROOT/vendor/bundle/ruby/2.5.0:/opt/ruby/gems/2.5.0).
AWS_XRAY_CONTEXT_MISSING – For X-Ray tracing, Lambda sets this to LOG_ERROR to avoid throwing runtime errors from the X-Ray SDK.
AWS_XRAY_DAEMON_ADDRESS – For X-Ray tracing, the IP address and port of the X-Ray daemon.
AWS_LAMBDA_DOTNET_PREJIT – For the .NET 3.1 runtime, set this variable to enable or disable .NET 3.1 specific runtime optimizations. Values include always, never, and provisioned-concurrency. For information, see Configuring provisioned concurrency.
Learn how to convert the mutable latest Lambda version into an immutable published version, locking code, configuration, and environment variables, then create and manage version numbers and switch between versions.
Learn how aliases simplify serverless deployments by routing API gateway endpoints to specific function versions, enabling flexible versioning and seamless front end updates.
Upload code to a serverless function by zipping a Node.js project, installing dependencies like moment, and uploading the zip to the function; then test the function to see date formatting.
Learn how to upload serverless code to AWS by creating an S3 bucket, uploading a zip package, and deploying the function, with tips for large files.
Learn how code signing with AWS lambda enforces trusted deployments by creating a signing profile and configuration, signing code in S3, and enforcing signature during deployment.
Learn to create a moment library as an AWS serverless layer, attach it to an AWS Lambda function, specify the Node 14 runtime, deploy, and test with an event.
Learn how to invoke a Lambda function and why invocation choices shape your AWS serverless architecture. This introductory chapter highlights the importance of invocation strategies for effective design.
Explore synchronous invocation, where a client sends an event to a Lambda function, which processes it and returns a response via the API gateway or Elastic Load Balancing.
Explore synchronous Lambda invocation in a serverless AWS setup via console, API Gateway, or AWS CLI with a payload, returning the Lambda output and a 200 status.
Learn how asynchronous invocation routes an event to a Lambda function, without waiting for a response. See examples from Amazon S3 and CloudFormation.
Invoke a lambda function asynchronously via the CLI with one extra parameter; verify a 202 response and CloudWatch logs, and show S3-triggered execution by uploading a bucket object.
Explore how asynchronous invocation uses the event queue to retry failed Lambda executions, publish errors to events, and log activity in CloudWatch with configurable retry counts and six-hour retention.
Explore how to configure a retry mechanism for an asynchronously invoked lambda, including throttling, a dead-letter queue, and a topic that sends an email notification on failures.
learn how destination for asynchronous invocation routes a lambda's response to a target such as an email address or another lambda, including configuring destinations and testing with asynchronous invocation.
Learn how event source mappings connect queues to Lambda functions, enabling batch processing of messages from SQS and streams like DynamoDB and Kinesis.
Learn how AWS Lambda concurrency controls the number of function instances that run simultaneously, how new requests trigger additional instances, and how provision concurrency preloads execution environments at a cost.
Command to install hey in your local machine
sudo yum install go
go get -u github.com/rakyll/hey
Explore how provision concurrency eliminates cold-start delays by keeping an execution environment ready for lambda functions, reducing latency compared to non-provisioned runs.
Connect your lambda to an ec2 via its private ip, run an express node app, and fetch data with axios.
This course teaches you on how to use AWS Lambda Function . This course is for system architects espacially who want to use Terraform to create complex architecture but it can be enjoyed by beginners and folks with basic understanding of AWS.
This course is for those who have a bit of knowledge of AWS and hence with no knowledge of AWS will find it a bit difficult to grasp the concepts
This course has been curated with a lot of care and deliberation and contains examples that are seen in real software applications .Also all the codebase are provided for in the resource section and please do not hesitate to use them.
Also this course has been shortened to only include information that is important and has been edited to remove all the fluff and unwanted portions .
Also for any doubts and suggestion please do contact me and i will be glad to hear from you .
Also please do not forget to include reviews for my course as it will motivate me to create more content like this to serve you guys better .
Once again i thank you for your patience and i hope you have a fabulous time with the course and i will see you soon
Thanks
Rohit Abraham