Created
September 25, 2019 07:09
-
-
Save SumindaD/f7f9c65889c91ff29498039c62cf3676 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json | |
| import boto3 | |
| import os | |
| dynamodb = boto3.client('dynamodb') | |
| def handle(event, context): | |
| connectionId = event['requestContext']['connectionId'] | |
| # Delete connectionId from the database | |
| dynamodb.delete_item(TableName=os.environ['SOCKET_CONNECTIONS_TABLE_NAME'], Key={'connectionId': {'S': connectionId}}) | |
| return {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment