Security News
vlt Debuts New JavaScript Package Manager and Serverless Registry at NodeConf EU
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
@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
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
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
Security News
Research
The Socket Research Team uncovered a malicious Python package typosquatting the popular 'fabric' SSH library, silently exfiltrating AWS credentials from unsuspecting developers.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.