Tutorial video npm init npm -i –save (libraries) open in code, create handler function in index.js zip -r deploy.zip ./
Category: Lambda
Lambda event source filter pattern
Using serverless framework: Very good blog with examples emailUsersWhenJobComplete: handler: src/emailUsersWhenJobComplete.handler events: – stream: type: dynamodb arn: ${construct:batchJobs.tableStreamArn} filterPatterns: –
Lambda layer
AWS blank nodejs lambda lambda layer documentation A Lambda layer is a .zip file archive that contains supplementary code or
Lambda and SQS
Here’s how to avoid lambda throttling when lambda concurrency is limited: The maximum concurrency setting limits the number of concurrent
Securely Calling AWS Lambda from React
Use API Gateway Lambda authorizers A Lambda authorizer is useful if you want to implement a custom authorization scheme that
Keeping Lambda Warm
Reducing cold starts with Provisioned Concurrency Understanding how functions warmers work However, this is not a guaranteed way to reduce
Lambda Cache
https://katiyarvipinknp.medium.com/how-to-cache-the-data-in-aws-lambda-function-using-node-js-use-tmp-storage-of-aws-lambda-2c7e1e01d923 const cachedItem = {}; // as you know, anything declared outside the event handler function is reused between invocations.
Lambda inserting into SQS using message timer
https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/SQS.html#sendMessage-property const AWS = require(‘aws-sdk’); exports.handler = async (event, context) => { // Get the SQS client. const sqs =
Lambda executing step function nodejs example
var aws = require(‘aws-sdk’) exports.handler = (event, context, callback) => { var params = { stateMachineArn: ‘arn:aws:states:us-east-1:1234567890:stateMachine:Helloworld’, input: JSON.stringify({}) };
Step function and async lambda
Example project with async lambda and dynamo db Step function invoke lambda with the wiatforTaskToken method The async lambda can