Skip to content

Latest commit

 

History

History
56 lines (48 loc) · 1.96 KB

File metadata and controls

56 lines (48 loc) · 1.96 KB

HTTP API direct integration example

This template demonstrates using the new HTTP APIs direct integration to an Amazon SQS queue, a Kinesis Data Stream, and the default EventBridge bus. The following resources are built:

  • SQS Queue
  • Kinesis Data Stream
  • HTTP API
  • IAM Role for HTTP API
  • A Lambda function for testing.

The api.yaml file contains the OpenAPI definition for the direct integration.

Deployment

From this folder run:

sam deploy -g

Testing

Update the '<url>' with your URL after deployment

SQS

curl --location --request POST '<url>/sqs' \
--header 'Content-Type: application/json' \
--data-raw '{"MessageBody":"This is my message"}'

EventBridge

curl --location --request POST '<url>/eb' \
--header 'Content-Type: application/json' \
--data-raw '{"Detail": {"First Name": "My first name"}}'

Kinesis

curl --location --request POST '<url>/kinesis' \
--header 'Content-Type: application/json' \
--data-raw '{"Data": "Here is the data"}'