Can someone explain this "connect EAFNOSUPPORT" Lambda error?

0

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
}

gefragt vor 2 Jahren3722 Aufrufe
2 Antworten
1

Lambda does not support IPv6 for outbound traffic.

profile pictureAWS
EXPERTE
Uri
beantwortet vor 2 Jahren
0

It looks like the code is trying to connect to an IPv6 address of ::1:80 and that's what is failing. You'll need to determine why that is happening and correct it.

profile pictureAWS
EXPERTE
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen