aws-sdk-js-codemod
aws-sdk-js-codemod copied to clipboard
[Feature]: Looking for codemod to be able to convert below examples
trafficstars
Self-service
- [ ] I'd be willing to implement this feature
Problem
const AWS = require('aws-sdk');
credentials = new AWS.EC2MetadataCredentials()
credentials = new AWS.EnvironmentCredentials('AWS');
credentials = new AWS.SharedIniFileCredentials({...);
const endpoint = new AWS.Endpoint(uri.host);
const req = new AWS.HttpRequest(endpoint);
const signer = new AWS.Signers.V4(req, 'es');
signer.addAuthorization(credentials, new Date());
const send = new AWS.NodeHttpClient();
Solution
The codemode to convert them to V3 https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/migrating-to-v3.html
Alternatives
N/A
Additional context
No response
Transformation for Credentials was added in https://github.com/awslabs/aws-sdk-js-codemod/pull/598
AWS.Endpoint is also used in nocodb
https://github.com/search?q=repo%3Anocodb%2Fnocodb%20AWS.Endpoint&type=code