Issue with Adding Object to S3 from Deno Deploy (Works Locally)
Hello everyone,
I'm facing an issue with uploading objects to my S3 server using the AWS SDK in Deno Deploy. The same code works perfectly fine when running on my local system, but fails after being deployed to Deno Deploy.
Additional Information:
1. Locally, everything works as expected, and I can upload objects to the S3 server without any issues.
2. The issue arises only after the deployment to Deno Deploy.
3. I’ve verified the environment variables (AWS_ACCESS_KEY, AWS_SECRET_KEY, AWS_ENDPOINT, AWS_REGION) and they are correctly set in Deno Deploy.
Questions:
1. Is there something specific about Deno Deploy that could be causing this issue with the AWS SDK?
2. Are there known limitations or configurations needed for S3 uploads in Deno Deploy?
3. Has anyone encountered a similar issue or have suggestions on how to resolve this?
Any help or guidance would be greatly appreciated. Thank you!
2 Replies
here’s the code I’m using:
Hi! I'm not too familiar with deploy, or aws-sdk. But I have had success using https://deno.land/x/s3@0.5.0 as a simple, lightweight library for S3. IIRC aws-sdk was at least unnecessarily huge. Can't remember if that was the reason I ditched the official aws-sdk, or was it not working with deno for some reason. Either way, the mentioned library has served me well.