AWS API-Gateway communicating to SNS

后端 未结 7 809
暗喜
暗喜 2020-12-29 06:13

I am building an API which will be serviced by Lambda functions but I need these to be asynchronous so rather than connecting the API-Gateway directly to the Lambda function

7条回答
  •  轮回少年
    2020-12-29 06:33

    I'm from the Api Gateway team.

    I believe there are a few formats for the HTTP request to the Publish API, but here's the one I used first:

    AWS Region us-west-2

    AWS Service sns

    AWS Subdomain

    HTTP method POST

    Action Publish

    == query strings ==

    Subject 'foo'
    Message 'bar'
    TopicArn 'arn:aws:sns:us-west-2:xxxxxxxxxxxx:test-api'

    This worked for me to publish a message.

    Let me know if you have further troubles.

    Jack

提交回复
热议问题