diff --git a/tests/manual/websocket/RouteSelection/handler.js b/tests/manual/websocket/RouteSelection/handler.js index 3dbcdd17f..d3512010d 100644 --- a/tests/manual/websocket/RouteSelection/handler.js +++ b/tests/manual/websocket/RouteSelection/handler.js @@ -1,6 +1,6 @@ 'use strict' -const AWS = require('aws-sdk') +const { ApiGatewayManagementApi } = require('aws-sdk') const { parse, stringify } = JSON @@ -23,7 +23,7 @@ function newAWSApiGatewayManagementApi(event) { const endpoint = `${event.requestContext.domainName}/${event.requestContext.stage}` const apiVersion = '2018-11-29' - return new AWS.ApiGatewayManagementApi({ apiVersion, endpoint }) + return new ApiGatewayManagementApi({ apiVersion, endpoint }) } exports.echo = async function echo(event, context) { diff --git a/tests/manual/websocket/main/handler.js b/tests/manual/websocket/main/handler.js index 1ba1f3cd5..b69d04c2e 100644 --- a/tests/manual/websocket/main/handler.js +++ b/tests/manual/websocket/main/handler.js @@ -1,18 +1,18 @@ 'use strict' const { env } = require('node:process') -const AWS = require('aws-sdk') +const { ApiGatewayManagementApi, DynamoDB } = require('aws-sdk') const { parse, stringify } = JSON const ddb = (() => { if (env.IS_OFFLINE) - return new AWS.DynamoDB.DocumentClient({ + return new DynamoDB.DocumentClient({ endpoint: 'http://localhost:8000', region: 'localhost', }) - return new AWS.DynamoDB.DocumentClient() + return new DynamoDB.DocumentClient() })() const successfullResponse = { @@ -34,7 +34,7 @@ function newAWSApiGatewayManagementApi(event) { const endpoint = `${event.requestContext.domainName}/${event.requestContext.stage}` const apiVersion = '2018-11-29' - return new AWS.ApiGatewayManagementApi({ apiVersion, endpoint }) + return new ApiGatewayManagementApi({ apiVersion, endpoint }) } exports.connect = async function connect(event, context) {