![Meet Socket at BlackHat and DEF CON in Las Vegas](https://cdn.sanity.io/images/cgdhsj6q/production/4a3876139ffd3878bb3e7800a14cf4044245dca7-1080x834.jpg?w=400&fit=max&auto=format)
Security News
Meet Socket at BlackHat and DEF CON in Las Vegas
Come meet the Socket team at BlackHat and DEF CON! We're sponsoring some fun networking events and we would love to see you there.
@aws-sdk/middleware-bucket-endpoint
Advanced tools
[![NPM version](https://img.shields.io/npm/v/@aws-sdk/middleware-bucket-endpoint/latest.svg)](https://www.npmjs.com/package/@aws-sdk/middleware-bucket-endpoint) [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/middleware-bucket-endpoint.svg)](http
Package description
The @aws-sdk/middleware-bucket-endpoint package is part of the AWS SDK for JavaScript (v3). It provides middleware that automatically configures the endpoint for S3 bucket operations, allowing users to interact with different S3 bucket configurations and regions more seamlessly. This package is particularly useful for managing requests to S3 buckets by modifying the endpoint based on the operation and the provided bucket parameters.
Automatic Endpoint Resolution
This code sample demonstrates how to integrate the bucketEndpointMiddleware into an S3 client instance. It automatically resolves the correct endpoint for the bucket specified in the command.
import { S3Client, GetObjectCommand } from '@aws-sdk/client-s3';
import { bucketEndpointMiddleware } from '@aws-sdk/middleware-bucket-endpoint';
const client = new S3Client({
region: 'us-west-2',
middlewareStack: {
add: (middleware) => middleware(bucketEndpointMiddleware())
}
});
const command = new GetObjectCommand({ Bucket: 'example-bucket', Key: 'example-object' });
client.send(command);
This package includes various middleware utilities for S3 operations within the AWS SDK for JavaScript. It offers functionalities similar to @aws-sdk/middleware-bucket-endpoint but is broader in scope, covering more aspects of S3 interactions beyond just endpoint resolution.
While primarily focused on generating pre-signed URLs for S3 requests, this package interacts with S3 endpoints in a manner that complements the functionalities provided by @aws-sdk/middleware-bucket-endpoint. It handles endpoint resolution implicitly when generating URLs.
Changelog
3.347.0 (2023-06-06)
Readme
FAQs
[![NPM version](https://img.shields.io/npm/v/@aws-sdk/middleware-bucket-endpoint/latest.svg)](https://www.npmjs.com/package/@aws-sdk/middleware-bucket-endpoint) [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/middleware-bucket-endpoint.svg)](http
We found that @aws-sdk/middleware-bucket-endpoint demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Come meet the Socket team at BlackHat and DEF CON! We're sponsoring some fun networking events and we would love to see you there.
Security News
Learn how Socket's 'Non-Existent Author' alert helps safeguard your dependencies by identifying npm packages published by deleted accounts. This is one of the fastest ways to determine if a package may be abandoned.
Security News
In July, the Python Software Foundation mounted a quick response to address a leaked GitHub token, elected new board members, and added more members to the team supporting PSF and PyPI infrastructure.