Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@aws-sdk/middleware-flexible-checksums
Advanced tools
[![NPM version](https://img.shields.io/npm/v/@aws-sdk/middleware-flexible-checksums/latest.svg)](https://www.npmjs.com/package/@aws-sdk/middleware-flexible-checksums) [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/middleware-flexible-checksums.s
@aws-sdk/middleware-flexible-checksums is a middleware package for the AWS SDK for JavaScript. It provides functionality to handle flexible checksums for AWS services, ensuring data integrity during transmission.
Adding Checksum to Requests
This feature allows you to add a checksum to your S3 PutObject requests to ensure data integrity during transmission.
const { S3Client, PutObjectCommand } = require('@aws-sdk/client-s3');
const { flexibleChecksumsMiddleware } = require('@aws-sdk/middleware-flexible-checksums');
const client = new S3Client({
region: 'us-west-2',
});
client.middlewareStack.add(flexibleChecksumsMiddleware(), {
step: 'build',
priority: 'high',
});
const command = new PutObjectCommand({
Bucket: 'example-bucket',
Key: 'example-key',
Body: 'Hello, world!',
});
client.send(command).then((response) => {
console.log('Success', response);
}).catch((error) => {
console.error('Error', error);
});
Validating Checksum in Responses
This feature allows you to validate the checksum in the response from an S3 GetObject request to ensure data integrity.
const { S3Client, GetObjectCommand } = require('@aws-sdk/client-s3');
const { flexibleChecksumsMiddleware } = require('@aws-sdk/middleware-flexible-checksums');
const client = new S3Client({
region: 'us-west-2',
});
client.middlewareStack.add(flexibleChecksumsMiddleware(), {
step: 'deserialize',
priority: 'high',
});
const command = new GetObjectCommand({
Bucket: 'example-bucket',
Key: 'example-key',
});
client.send(command).then((response) => {
console.log('Success', response);
}).catch((error) => {
console.error('Error', error);
});
The 'aws-sdk' package is the official AWS SDK for JavaScript. It provides a comprehensive set of tools for interacting with AWS services, including S3. While it does not specifically focus on flexible checksums, it offers a wide range of functionalities for AWS services.
The 'aws4' package is a lightweight library for signing AWS requests using AWS Signature Version 4. It does not provide checksum functionality but is useful for securely signing requests to AWS services.
The 's3-upload-stream' package is a Node.js library for streaming uploads to Amazon S3. It focuses on streaming data to S3 and does not provide checksum functionality, but it is useful for handling large file uploads.
FAQs
[![NPM version](https://img.shields.io/npm/v/@aws-sdk/middleware-flexible-checksums/latest.svg)](https://www.npmjs.com/package/@aws-sdk/middleware-flexible-checksums) [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/middleware-flexible-checksums.s
The npm package @aws-sdk/middleware-flexible-checksums receives a total of 6,236,346 weekly downloads. As such, @aws-sdk/middleware-flexible-checksums popularity was classified as popular.
We found that @aws-sdk/middleware-flexible-checksums 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.