// Get signed URL from S3
const s3Params = {
Bucket: process.env.UploadBucket,
Key,
Expires: URL_EXPIRATION_SECONDS,
ContentType: ‘image/jpeg’,
// This ACL makes the uploaded object publicly readable. You must also uncomment
// the extra permission for the Lambda function in the SAM template.
// ACL: 'public-read'
Hello, Abhishek Kumar Gupta, and welcome to the forum!
It is unlikely that anyone on this site will translate your entire node program into Go and give it to you. There are other web sites where you can pay people to do that for you, but the goal of the members on this site is to help guide you so you can solve the problem (mostly) yourself.
With that goal in mind, at this time, my suggestions to you are:
If you have any specific questions (e.g.: “How do I set up a Lambda entry point in Go?” or “How do I specify an S3 upload timeout in Go?”, etc.), feel free to ask them here.
Great advice. One more resource that will be useful: it looks like that node.js code is reading an environment variable for region. Check this go by example for a succinct example on how to do that in go:
Though I’m honestly not sure if it’s needed for AWS_REGION - since the AWS SDK will use that environment variable anyway so there’s no need to set it in the config. But for UploadBucket it might come in handy.