Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Lambda Authorizer for AppSync API intermittently timing out while fetching SSM parameters for hydrating Lambda env variables #2425

Open
vishal-dms opened this issue Jan 15, 2025 · 1 comment
Labels
not-reproducible Issue is not reproducible pending-triage Incoming issues that need categorization

Comments

@vishal-dms
Copy link

Environment information

N/A

Describe the bug

Custom Lambda Authorizer for AppSync API intermittently timing out while fetching SSM parameters for hydrating Lambda env variables

2024-12-09 09:02:50 - START RequestId: 314bbedf-abcabcabc Version: $LATEST
2024-12-09 09:02:50 - END RequestId: 314bbedf-abcabcabc
2024-12-09 09:02:50 - REPORT RequestId: 314bbedf-abcabcabc	Duration: 4.54 ms	Billed Duration: 5 ms	Memory Size: 512 MB	Max Memory Used: 96 MB
2024-12-09 09:03:14 - 2024-12-09T08:03:14.913Z	314bbedf-abcabcabc	Unhandled Promise Rejection 	{
    "errorType": "Runtime.UnhandledPromiseRejection",
    "errorMessage": "TimeoutError: Client network socket disconnected before secure TLS connection was established",
    "reason": {
        "errorType": "TimeoutError",
        "errorMessage": "Client network socket disconnected before secure TLS connection was established",
        "code": "ECONNRESET",
        "path": null,
        "host": "ssm.eu-west-1.amazonaws.com",
        "port": 443,
        "name": "TimeoutError",
        "$metadata": {
            "attempts": 3,
            "totalRetryDelay": 174
        },
        "stack": ["Error: Client network socket disconnected before secure TLS connection was established", "    at connResetException (node:internal/errors:720:14)", "    at TLSSocket.onConnectEnd (node:_tls_wrap:1714:19)", "    at TLSSocket.emit (node:events:529:35)", "    at endReadableNT (node:internal/streams/readable:1400:12)", "    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)"]
    },
    "promise": {},
    "stack": ["Runtime.UnhandledPromiseRejection: TimeoutError: Client network socket disconnected before secure TLS connection was established", "    at process.<anonymous> (file:///var/runtime/index.mjs:1276:17)", "    at process.emit (node:events:517:28)", "    at emit (node:internal/process/promises:149:20)", "    at processPromiseRejections (node:internal/process/promises:283:27)", "    at process.processTicksAndRejections (node:internal/process/task_queues:96:32)"]
}

The error seems to be originating from internalAmplifyFunctionResolveSsmParams while resolving parameters from SSM (as authorizer business logic does not have any calls to SSM calls).

Reproduction steps

Configure a custom Lambda authorizer on API

@vishal-dms vishal-dms added the pending-triage Incoming issues that need categorization label Jan 15, 2025
@ykethan
Copy link
Member

ykethan commented Jan 16, 2025

Hey, thank you for reaching out. I have not been able to reproduce this issue using the example from documentation. But the Amplify team is currently diving into this issue.

@ykethan ykethan added the not-reproducible Issue is not reproducible label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-reproducible Issue is not reproducible pending-triage Incoming issues that need categorization
Projects
None yet
Development

No branches or pull requests

2 participants