Security News
NVD Backlog Tops 20,000 CVEs Awaiting Analysis as NIST Prepares System Updates
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
@aws-sdk/middleware-endpoint
Advanced tools
[![NPM version](https://img.shields.io/npm/v/@aws-sdk/middleware-endpoint/latest.svg)](https://www.npmjs.com/package/@aws-sdk/middleware-endpoint) [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/middleware-endpoint.svg)](https://www.npmjs.com/pac
The @aws-sdk/middleware-endpoint package is part of the AWS SDK for JavaScript v3. It is used to manage and resolve endpoints in AWS service calls. This middleware allows developers to customize endpoint resolution logic, which can be useful for directing requests to specific regions, using custom domain names, or working with mock endpoints for testing purposes.
Custom Endpoint Resolution
This code demonstrates how to use the @aws-sdk/middleware-endpoint package to customize the endpoint for an S3 client. It adds a middleware that resolves to a custom endpoint, which is useful for directing requests to a specific server or for testing with mock endpoints.
const { S3Client, GetObjectCommand } = require('@aws-sdk/client-s3');
const { endpointMiddleware } = require('@aws-sdk/middleware-endpoint');
const client = new S3Client({
region: 'us-west-2'
});
client.middlewareStack.add(endpointMiddleware({
endpoint: () => ({
protocol: 'https:',
hostname: 'my-custom-s3-endpoint.com',
path: '/',
query: {}
})
}), {
step: 'build'
});
const command = new GetObjectCommand({ Bucket: 'example-bucket', Key: 'example-object' });
client.send(command);
This package provides middleware for handling retries of requests in AWS SDK for JavaScript v3. It is similar to @aws-sdk/middleware-endpoint in that it modifies the request handling pipeline, but it focuses on retry logic rather than endpoint resolution.
The @aws-sdk/middleware-logger package allows logging of requests and responses in the AWS SDK for JavaScript v3. Like @aws-sdk/middleware-endpoint, it enhances the SDK's capabilities by adding middleware that intercepts and logs all service interactions, although its primary focus is on logging rather than endpoint management.
3.325.0 (2023-05-02)
FAQs
[![NPM version](https://img.shields.io/npm/v/@aws-sdk/middleware-endpoint/latest.svg)](https://www.npmjs.com/package/@aws-sdk/middleware-endpoint) [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/middleware-endpoint.svg)](https://www.npmjs.com/pac
The npm package @aws-sdk/middleware-endpoint receives a total of 1,124,248 weekly downloads. As such, @aws-sdk/middleware-endpoint popularity was classified as popular.
We found that @aws-sdk/middleware-endpoint demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.