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?

profile picture
wz2b
preguntada hace 2 años201 visualizaciones
1 Respuesta
1
Respuesta aceptada

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
EXPERTO
Uri
respondido hace 2 años
  • Thanks. I decided to do it with #3 but then I added a CloudFront in front of it, it's pretty clean!

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas