For example, When I use this function like this
// snippet-start:[s3.JavaScript.buckets.createBucket]
// Load the AWS SDK for Node.js
var AWS = require('aws-sdk');
// Set the region
AWS.config.update({region: 'REGION'});
// Create S3 service object
s3 = new AWS.S3({apiVersion: '2006-03-01'});
// Create the parameters for calling createBucket
var bucketParams = {
Bucket : process.argv[2]
};
// call S3 to create the bucket
s3.createBucket(bucketParams, function(err, data) {
if (err) {
console.log("Error", err);
} else {
console.log("Success", data.Location);
}
});
I want to see the code that implements the function. When I looked at the AWS SDK code, I couldn't go deeper than this.
Where can I see the code for the AWS SDK function?
CodePudding user response:
.d.ts
files are not code, they are only type definitions.
If you look at the s3.js
file that is next to that s3.d.ts
file you've already found, you will see that it calls require('../lib/services/s3')
.
Look in that file to find the code.