Connecting to AWS Lambda via Amazon API Gateway Using REST
In the 9.8.0 release of the PubSub+ event broker, you can configure a REST delivery point (RDP), to extend and produce messages into various Amazon services, such as Simple Notification Service (SNS), Simple Queue Services (SQS) and Lambda, all via the Amazon API Gateway.
The goal of this tutorial is to demonstrate how to set up an Amazon API Gateway REST connector in a PubSub+ event broker to send messages to a Lambda function from a remote connection. This tutorial will show you how to:
- Configure the event broker to set up RDPs with a REST connector
- Send messages to the Lambda function using the Try Me! functionality built into the PubSub+ Broker Manager
- Review messages in the Lambda logs
- Solace PubSub+ Event Broker 9.8.0 or higher
- Access to PubSub+ Broker Manager (refer to Solace PubSub+ Broker Manager)
Connecting to AWS Lambda via Amazon API Gateway
In the 9.8.0 release of the PubSub+ event broker, the new REST Connector wizard can help you set up and configure integrations to various cloud platforms and their services.
This example shows how to integrate the PubSub+ event broker with AWS Lambda via an Amazon API Gateway.
- Log into the PubSub+ Broker Manager.
- Launch the connector Click-to-Connect Wizard (refer to Creating a REST Connector with Click-to-Connect).
Click Amazon AWS.
Click Amazon API Gateway then click Authenticate.
Provide a name for the connector and enter the API key for the API Gateway.
You can get the API key from the AWS console in the API Keys section.
Provide the endpoint path of the API gateway and configure the client profile accordingly.
You can get the endpoint path from the AWS console in the Stages section.
Click Subscription Setupand set up the subscription for the messages.
Click Create and Enable Connector to finalize the connector creation.
Set up a Lambda function that responds to the messages being sent from the connector.
Use the PubSub+ Broker Manager Try Me! application to send a message.
View the message in the lambda function logs.