I am trying to find a way to use a GET method in API gateway to send the name of a file to a Lambda function that finds the file in my S3 bucket and converts it to a temporary S3 URL. I got it to work with me manually putting the name of the file into Lambda, but I want it to be dynamic. I am making an audiobook player app and I want it to play the right file that corresponds with the book.
How would I accomplish this? Here’s some screenshots of API gateway and my Lambda function with the sensitive details blacked out: