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
已提問 2 年前檢視次數 201 次
1 個回答
1
已接受的答案

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
專家
Uri
已回答 2 年前
  • Thanks. I decided to do it with #3 but then I added a CloudFront in front of it, it's pretty clean!

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南