I have started migration of AWS SDK from v2 to v3. Can`t figure out what to use to create endpoint for S3.
In v2 I have:
const aws = require('aws-sdk');
const ep = new aws.Endpoint(s3.region.amazonaws.com
);
What package need to use in V3 for this ?
did you try this?
const { S3Client } = require('@aws-sdk/client-s3');
const s3 = new S3Client({ region: 'region' });
for custom endpoint, try this:
const s3 = new S3Client({ endpoint: 'https://s3.region.yourendpoint', region: 'region' });
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With