@yingyeothon/aws-apigateway-management-api
v2.536.0
Published
A patch for lower version of AWS-SDK if or if not has ApiGatewayManagementApi.
Downloads
2
Readme
[email protected]
A library to provide the ApiGatewayManagementApi
module from [email protected]
for AWS Lambda container that has only [email protected]
library. It is highly inspired from guerrerocarlos/AWS-ApiGatewayManagementApi.
Now, AWS Lambda for JavaScript runtime has [email protected]
that already includes a basic ApiGatewayManagementApi
module but there is a missing useful API such as DeleteConnection
. This library will patch your aws-sdk
as possible as small.
What does change
Please see aws-sdk-js/CHANGELOG with a search of apigatewaymanagementapi
. Now, there is an only change for DeleteConnection
API.
How to use
import { newApiGatewayManagementApi } from "@yingyeothon/aws-apigateway-management-api";
const dropConnection = (event: APIGatewayProxyEvent) =>
newApiGatewayManagementApi({
endpoint: event.requestContext.domainName + "/" + event.requestContext.stage
})
.deleteConnection({
ConnectionId: event.requestContext.connectionId
})
.promise();
Disclaim
This code is copied from aws-sdk-js.
Unlike guerrerocarlos/AWS-ApiGatewayManagementApi, it will patch anyway if there is a newly module in your aws-sdk
so please be careful.