Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Configure proxies for Node.js - AWS SDK for JavaScript

The AWS SDK for JavaScript V3 API Reference Guide describes in detail all the API operations for the AWS SDK for JavaScript version 3 (V3).

The AWS SDK for JavaScript V3 API Reference Guide describes in detail all the API operations for the AWS SDK for JavaScript version 3 (V3).

Configure proxies for Node.js

If you can't directly connect to the internet, the SDK for JavaScript supports use of HTTP or HTTPS proxies through a third-party HTTP agent.

To find a third-party HTTP agent, search for "HTTP proxy" at npm.

To install a third-party HTTP agent proxy, enter the following at the command prompt, where PROXY is the name of the npm package.

npm install PROXY --save

To use a proxy in your application, use the httpAgent and httpsAgent property, as shown in the following example for a DynamoDB client.

import { DynamoDBClient } from '@aws-sdk/client-dynamodb'; import { NodeHttpHandler } from "@smithy/node-http-handler"; import { HttpsProxyAgent } from "hpagent"; const agent = new HttpsProxyAgent({ proxy: "http://internal.proxy.com" }); const dynamodbClient = new DynamoDBClient({ requestHandler: new NodeHttpHandler({ httpAgent: agent, httpsAgent: agent }), });
Note

httpAgent is not the same as httpsAgent, and since most calls from the client will be to https, both should be set.

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.