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回答
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!

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ