Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@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,028,594 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.