Skip to content

Commit

Permalink
Merge pull request #59 from jli996/patch-1
Browse files Browse the repository at this point in the history
Construct api end point from apiId, aws region and stage.
  • Loading branch information
dgomesbr authored Dec 3, 2024
2 parents 85c20bb + 562e6d9 commit 43ab677
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sendmessage/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ exports.handler = async event => {

const apigwManagementApi = new AWS.ApiGatewayManagementApi({
apiVersion: '2018-11-29',
endpoint: event.requestContext.domainName + '/' + event.requestContext.stage
endpoint: `${event.requestContext.apiId}.execute-api.${process.env.AWS_REGION}.amazonaws.com/${event.requestContext.stage}`
});

const postData = JSON.parse(event.body).data;
Expand Down

0 comments on commit 43ab677

Please sign in to comment.