Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Deep Dive on Lambda Destinations

Aletheia
January 09, 2020

Deep Dive on Lambda Destinations

Deep dive on re:Invent new announcement of Lambda Destinations. Use cases and demos

Aletheia

January 09, 2020
Tweet

More Decks by Aletheia

Other Decks in Technology

Transcript

  1. AWS Lambda Functions can be invoked in different ways About

    Lambda invocation • Synchronous invocation • Poll invocation • Asynchronous invocation
  2. Synchronous invocation Function is invoked directly from other services. Grant

    the other service permission in the function's resource- based policy, and configure the other service to generate events and invoke your function. Services That Invoke Lambda 
 Functions Synchronously • Application Load Balancer • Amazon Cognito • Amazon Lex • Amazon Alexa • Amazon API Gateway • Amazon CloudFront (Lambda@Edge) • Amazon Kinesis Data Firehose • AWS Step Function aws lambda invoke —function-name MyLambdaFunction —invocation- type RequestResponse —payload “[JSON string here]”
  3. Poll invocation Used for services that generate a queue or

    data stream. Needs event source mapping creation and Lambda needs permissions to access the other service in the execution role. Services That Invoke Lambda 
 Functions Synchronously • Amazon Kinesis • Amazon DynamoDB • Amazon Simple Queue Service
  4. Asynchronous invocation Lambda queues the event before passing it to

    your function. The other service gets a success response as soon as the event is queued and isn't aware of what happens afterwards. Failed events can be routed to DLQ. Services That Invoke Lambda 
 Functions Asynchronously • Amazon Simple Storage Service • Amazon Simple Notification Service • Amazon Simple Email Service • AWS CloudFormation • Amazon CloudWatch Logs • Amazon CloudWatch Events • AWS CodeCommit • AWS Config • AWS IoT • AWS IoT Events • AWS CodePipeline aws lambda invoke —function-name MyLambdaFunction —invocation- type Event —payload “[JSON string here]”
  5. Lambda Destinations Route asynchronous function results as an execution record

    to a destination resource without writing additional code. An execution record contains details about the request and response in JSON format including version, timestamp, request context, request payload, response context, and response payload.