Serving S3 from an ApiGatewayV2

0

Using CDK, I went to try to add an AwsIntegration (to s3) to an apigatewayv2.HttpApi, when I realized that's not possible, and I was mixing up the old API gateway with the new one, which you can't do.

Is my main option here to make a lambda that does the proxying on my behalf?

1 Answer
1
Accepted Answer

You have 3 main options:

  1. Use REST API (v1) which has direct integration with S3. Note that API Gateway has a 10 MB payload size limit.
  2. Use a Lambda function to proxy the request to S3. Note that Lambda has a 6 MB payload size limit.
  3. I think the preferred option, generate a pre-signed URL for the S3 object and download it directly from S3 to the client.
profile pictureAWS
EXPERT
Uri
answered a year ago
  • Thanks. I decided to do it with #3 but then I added a CloudFront in front of it, it's pretty clean!

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions