By using AWS re:Post, you agree to the Terms of Use

Questions tagged with AWS Lambda

Sort by most recent

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

Can someone explain this "connect EAFNOSUPPORT" Lambda error?

Hello, I have deployed a Node JS API to Lambda which works fine on my local development machine. However when the Lambda is triggered it runs until it hits a call to an external API(authorize.net). I receive the following error that I'm not quite sure the meaning of. Did a search and came up empty. There are other external API calls in the function that work if I circumvent this particular problematic call. Your help would be greatly appreciated. ``` 2022-09-22T16:51:59.090Z 29f689fb-1ae5-4b26-bd21-69ce6bab6ae1 INFO { "message": "connect EAFNOSUPPORT ::1:80 - Local (undefined:undefined)", "name": "Error", "stack": "Error: connect EAFNOSUPPORT ::1:80 - Local (undefined:undefined)\n at internalConnect (node:net:953:16)\n at defaultTriggerAsyncIdScope (node:internal/async_hooks:465:18)\n at node:net:1044:9\n at processTicksAndRejections (node:internal/process/task_queues:78:11)", "config": { "transitional": { "silentJSONParsing": true, "forcedJSONParsing": true, "clarifyTimeoutError": false }, "transformRequest": [ null ], "transformResponse": [ null ], "timeout": 0, "xsrfCookieName": "XSRF-TOKEN", "xsrfHeaderName": "X-XSRF-TOKEN", "maxContentLength": -1, "maxBodyLength": -1, "env": {}, "headers": { "Accept": "application/json, text/plain, */*", "Content-Type": "application/json", "User-Agent": "axios/0.27.2", "Content-Length": 143 }, "method": "post", "url": "/", "data": "{\"getTransactionDetailsRequest\":{\"merchantAuthentication\":{\"name\":\"[my-login-id]\",\"transactionKey\":\"[my-transaction-key]\"},\"transId\":\"60201341313\"}}" }, "code": "EAFNOSUPPORT", "status": null } ```
2
answers
0
votes
83
views
asked 11 days ago

Lambda random long execution while running QLDB query

I have a lambda triggered by a SQS FIFO queue when there are messages on this queue. Basically this lambda is getting the message from the queue and connecting to QLDB through a VPC endpoint in order to run a simple SELECT query and a subsequent INSERT query. The table selected by the query has a index for the field used in the where condition. Flow (all the services are running "inside" a VPC): `SQS -> Lambda -> VPC interface endpoint -> QLDB` Query SELECT: `SELECT FIELD1, FIELD2 FROM TABLE1 WHERE FIELD3 = "ABCDE"` Query INSERT: `INSERT INTO TABLE1 .....` This lambda is using a shared connection/session on QLDB and this is how I'm connecting to it: ``` import { QldbDriver, RetryConfig } from 'amazon-qldb-driver-nodejs' let driverQldb: QldbDriver const ledgerName = 'MyLedger' export function connectQLDB(): QldbDriver { if ( !driverQldb ) { const retryLimit = 4 const retryConfig = new RetryConfig(retryLimit) const maxConcurrentTransactions = 1500 driverQldb = new QldbDriver(ledgerName, {}, maxConcurrentTransactions, retryConfig) } return driverQldb } ``` When I run a load test that simulates around 200 requests/messages per second to that lambda in a time interval of 15 minutes, I'm starting facing a random long execution for that lambda while running the queries on QLDB (mainly the SELECT query). Sometimes the same query retrieves data around 100ms and sometimes it takes more than 40 seconds which results in lambda timeouts. I have changed lambda timeout to 1 minute but this is not the best approch and sometimes it is not enough too. The VPC endpoint metrics are showing around 250 active connections and 1000 new connections during this load test execution. Is there any QLDB metric that could help to identify the root cause of this behavior? Could it be related to some QLDB limitation (like the 1500 active sessions described here: https://docs.aws.amazon.com/qldb/latest/developerguide/limits.html#limits.default) or something related to concurrency read/write iops?
1
answers
0
votes
54
views
asked 14 days ago