Getting 500 Error When Uploading Photos to S3 from React App

    0
    0
    Asked By William Rossbach On

    Hey everyone! I'm new here and also new to the AWS stack. I'm working on a React/NodeJS application and trying to upload photos to S3, but I'm hitting a frustrating 500 error. Here's what I've done so far: I set up AWS Amplify for deployment, created a Lambda function to handle the uploads, and set up API Gateway to expose this function. I've also created an S3 bucket and ensured all the right permissions are in place. I dealt with some CORS issues and added the necessary headers, so everything seemed fine until I tried to upload photos. Here's the flow: there's an OPTIONS call first, followed by a PUSH call to get the upload URL, and then a PUT call to actually store the photo. However, it seems the PUT call is targeting an undefined endpoint, leading to the 500 error. I'm not sure where to look for the issue. Any suggestions would be greatly appreciated!

    0 Answers

    There is no answer to this question yet. If you know the answer or can offer some help, please use the form below.

    Related Questions

    LEAVE A REPLY

    Please enter your comment!
    Please enter your name here

    This site uses Akismet to reduce spam. Learn how your comment data is processed.