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 Resposta
1
Resposta aceita

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

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas