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/signature-v4-crt
Advanced tools
A revision of AWS Signature V4 request signer based on AWS Common Runtime https://github.com/awslabs/aws-crt-nodejs
@aws-sdk/signature-v4-crt is a package that provides AWS Signature Version 4 signing for requests made to AWS services. It is part of the AWS SDK for JavaScript and leverages the AWS Common Runtime (CRT) for enhanced performance and security.
Sign HTTP Requests
This feature allows you to sign HTTP requests to AWS services using AWS Signature Version 4. The code sample demonstrates how to sign a GET request to an S3 bucket using the SignatureV4Crt class.
const { SignatureV4Crt } = require('@aws-sdk/signature-v4-crt');
const { HttpRequest } = require('@aws-sdk/protocol-http');
const { defaultProvider } = require('@aws-sdk/credential-provider-node');
const signRequest = async () => {
const signer = new SignatureV4Crt({
service: 's3',
region: 'us-east-1',
credentials: defaultProvider(),
});
const request = new HttpRequest({
method: 'GET',
hostname: 'examplebucket.s3.amazonaws.com',
path: '/exampleobject',
});
const signedRequest = await signer.sign(request);
console.log(signedRequest);
};
signRequest();
Sign WebSocket Requests
This feature allows you to sign WebSocket requests to AWS services using AWS Signature Version 4. The code sample demonstrates how to sign a WebSocket request to an AWS IoT endpoint using the SignatureV4Crt class.
const { SignatureV4Crt } = require('@aws-sdk/signature-v4-crt');
const { WebSocketRequest } = require('@aws-sdk/protocol-websocket');
const { defaultProvider } = require('@aws-sdk/credential-provider-node');
const signWebSocketRequest = async () => {
const signer = new SignatureV4Crt({
service: 'iot',
region: 'us-east-1',
credentials: defaultProvider(),
});
const request = new WebSocketRequest({
hostname: 'example.iot.us-east-1.amazonaws.com',
path: '/mqtt',
});
const signedRequest = await signer.sign(request);
console.log(signedRequest);
};
signWebSocketRequest();
@aws-sdk/signature-v4 is another package from the AWS SDK for JavaScript that provides AWS Signature Version 4 signing. Unlike @aws-sdk/signature-v4-crt, it does not leverage the AWS Common Runtime (CRT) and may have different performance characteristics.
aws4 is a lightweight library for signing AWS requests with Signature Version 4. It is not part of the AWS SDK for JavaScript and is often used in environments where a smaller dependency footprint is desired.
This package contains native modules that only executable in Node.js runtime. Please refer to this issue for more information.
See also https://github.com/aws/aws-sdk-js-v3/tree/main#functionality-requiring-aws-common-runtime-crt.
FAQs
A revision of AWS Signature V4 request signer based on AWS Common Runtime https://github.com/awslabs/aws-crt-nodejs
The npm package @aws-sdk/signature-v4-crt receives a total of 229,428 weekly downloads. As such, @aws-sdk/signature-v4-crt popularity was classified as popular.
We found that @aws-sdk/signature-v4-crt 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.