Skip to content

Add configurable HTTP read timeout for Lambda invocation (default 240s)#6

Merged
MarcoRBosco merged 1 commit intomainfrom
copilot/add-lambda-runnout-parameter
Apr 9, 2026
Merged

Add configurable HTTP read timeout for Lambda invocation (default 240s)#6
MarcoRBosco merged 1 commit intomainfrom
copilot/add-lambda-runnout-parameter

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 9, 2026

Lambda functions running longer than the SDK's default HTTP read timeout cause the action to fail client-side before Lambda even returns. This adds a TIMEOUT input to control how long the action waits for a response.

Changes

  • action.yml: New optional TIMEOUT input (default "240" seconds), forwarded as INPUT_TIMEOUT env var to the binary
  • Cargo.toml: Added aws-smithy-types for TimeoutConfig
  • src/main.rs:
    • Reads TIMEOUT, warns and falls back to DEFAULT_TIMEOUT_SECS = 240 on invalid input
    • Applies TimeoutConfig::builder().read_timeout(...) to the AWS SDK client config

Usage

- uses: uampio/invoke-aws-lambda-rs@main
  with:
    FunctionName: my-long-running-fn
    TIMEOUT: "600"   # wait up to 10 minutes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants