Skip to content
This repository has been archived by the owner on Jul 17, 2023. It is now read-only.

A patch for lower version of AWS-SDK if or if not has ApiGatewayManagementApi.

Notifications You must be signed in to change notification settings

yingyeothon/aws-apigateway-management-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ApiGatewayManagementApi@2.536.0

A library to provide the ApiGatewayManagementApi module from aws-sdk-js@2.236.0 for AWS Lambda container that has only aws-sdk@2.488.0 library. It is highly inspired from guerrerocarlos/AWS-ApiGatewayManagementApi.

Now, AWS Lambda for JavaScript runtime has aws-sdk@2.488.0 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 the only change for DeleteConnection API.

How to use

yarn add @yingyeothon/aws-apigateway-management-api
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.

License

aws-sdk-js#LICENSE

About

A patch for lower version of AWS-SDK if or if not has ApiGatewayManagementApi.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published