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]”
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
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]”
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.