Questions tagged with Amazon API Gateway

Content language: English

Sort by most recent

Browse through the questions and answers listed below or filter and sort to narrow down your results.

Multipart upload with aws S3 + checksums

I am trying to implement browser multipart upload to a S3 bucket. I should be able to pause and play the upload and also I'll like to automatically generate the checksums as I'm uploading. I have tried several approaches and I've been hitting a wall. Some of the approaches I've tried. * Using the amplify S3 upload, this works well, but has the caveat that I can't generate the checksums automatically, to generate the checksums, I run a lambda function after file upload, the caveat is for large files, the lambda function times out. Also, I'll like to avoid going this route as I believe It's quite computationally expensive. * Using https://blog.logrocket.com/multipart-uploads-s3-node-js-react/. This is also similar to the above, the caveat is when I add the checksum algorithm to the upload part query, I get a **checksum type mismatch occurred, expected checksum type sha256, actual checksum type: null site:stackoverflow.com s3**. After a lot of googling, I'm not sure I can compute the checksums using presigned url. * and the current approach is to do away with the presigned url and send the chunked data to the lambda functions which then sends to the bucket. Since I'm managing everything with amplify, I run into some problems with API gateway(multipart/form-data). I have set the gateway to accept binary data and followed other fixes I found online but I’m stuck on **execution failed due to configuration error unable to transform request**. How do I fix the above error and what will be the ideal approach to implement the functionalities(multipart file upload to support resumable uploads and checksum computation)
0
answers
0
votes
23
views
asked 21 days ago

HTTP API PROXY INTEGRATION_NETWORK_FAILURE Error

Hi, Here is my setup: my.domain.com -> API GW Custom Domain -> HTTPAPI -> Route (/api/{+proxy}) -> VPCLink -> ALB -> HTTPS Listener -> TargetGroup (Type: Instance) -> ECS Fargate Service HTTPAPI integration has the following parameter mapping: path -> overwrite -> /$request.path.proxy (I want to get rid of "api" part in the url) when I make below request I got 503 errors time to time: https://my.domain.com/api/otherPath I have enabled access logs on HTTPAPI but they show very limited information. ALB logs are sent to S3 bucket so it is almost impossible to track request. Why do I get 503 errors ? Access log from HTTP API: ``` { "requestId": "req_id=", "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Safari/605.1.15", "sourceIp": "**.**.**.**", "requestTime": "09/Nov/2022:18:07:24 +0000", "requestTimeEpoch": "1668017244", "httpMethod": "GET", "path": "/otherPath", "status": "503", "protocol": "HTTP/1.1", "responseLength": "33", "domainName": "my.domain.com", "basePathMatched": "(none)", "error_Message": "Service Unavailable", "error_responseType": "INTEGRATION_NETWORK_FAILURE", "integrationErrorMessage": "-", "integration_Error": "-", "integrationStatus": "200", "integration_Status": "-", "integration_IntegrationStatus": "200", "integrationLatency": "9002" } ``` Please help, Thanks
0
answers
0
votes
18
views
asked 21 days ago