Reputation: 6006
I have an api. I want to serve content that is 180 mb. I can't use api gateway as its limit is 10 mb. Therefore I am placing the file in s3.
Now for that s3 url I still want to have api keys. That means I will need to go through the api gateway. Is this possible somehow to redirect to s3 url only from api gateway after key is verified without exposing the s3 url publicly?
This is not the same question as discussed here. I followed that question and am able to upload the bigger file to s3 bucket.
Now more clearly the question here is how to access this s3 url for downloading the file using API gateway with an API key? Can we do that?
Upvotes: 0
Views: 708
Reputation: 1968
Let your API return a pre-signed URL. https://docs.aws.amazon.com/AmazonS3/latest/userguide/ShareObjectPreSignedURL.html You can set the time for how long the link will be valid. The client then downloads from the download URL, does it work for you?
Upvotes: 2