Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
@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
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.
3.598.0 (2024-06-14)
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
The npm package @aws-sdk/middleware-bucket-endpoint receives a total of 6,583,083 weekly downloads. As such, @aws-sdk/middleware-bucket-endpoint popularity was classified as popular.
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
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.