
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Simple module to calculate Authorization
header for Amazon AWS REST requests.
Simple it is:
const AwsSign = require('aws-sign');
const signer = new AwsSign({
accessKeyId: 'AKIAIOSFODNN7EXAMPLE',
secretAccessKey: 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY'
});
const opts = {
method: 'PUT',
host: 'johnsmith.s3.amazonaws.com',
path: '/photos/puppy.jpg',
headers: { ... },
... // Other request options, ignored by AwsSign.
};
signer.sign(opts);
https.request(opts, ...);
The following keys are mandatory:
method
host
path
Others are optional. A date header (headers.date
) will be added for you if it is not already set.
Node.js has no legacy ;-) so there is no need to support some legacy features of Amazon API for older software. I.e. there is no support for path-style bucket access.
x-amz-date
substitution is not supported because Node's http module has no problems setting Date
header.
Multiple x-amz-
keys are not supported. I.e. the following part of the example won't work:
X-Amz-Meta-ReviewedBy: joe@johnsmith.net
X-Amz-Meta-ReviewedBy: jane@johnsmith.net
Use a single header instead:
X-Amz-Meta-ReviewedBy: joe@johnsmith.net,jane@johnsmith.net
mocha test/
npm install aws-sign
Egor Egorov, me@egorfine.com.
MIT.
FAQs
Calculates Authorization header for Amazon AWS REST requests
The npm package aws-sign receives a total of 62,851 weekly downloads. As such, aws-sign popularity was classified as popular.
We found that aws-sign demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.