Skip to content

feat(aws/lambda): add event invoke config#627

Open
mineiro wants to merge 1 commit into
alchemy-run:mainfrom
mineiro:feat/aws-lambda-event-invoke-config
Open

feat(aws/lambda): add event invoke config#627
mineiro wants to merge 1 commit into
alchemy-run:mainfrom
mineiro:feat/aws-lambda-event-invoke-config

Conversation

@mineiro

@mineiro mineiro commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Add AWS.Lambda.EventInvokeConfig for Lambda asynchronous invocation settings.

Supports retry count, event age, qualifiers, and success/failure destinations.

Example:

const config = yield* AWS.Lambda.EventInvokeConfig("AsyncConfig", {
  functionName: fn.functionName,
  maximumRetryAttempts: 0,
  maximumEventAgeInSeconds: 60,
  destinationConfig: {
    OnFailure: {
      Destination: queue.queueArn,
    },
  },
});

Tests:

  • cd packages/alchemy && bun vitest run test/AWS/Lambda/EventInvokeConfig.test.ts --reporter=verbose
  • Manual smoke: verified async Lambda failure delivery to SQS OnFailure destination

@sam-goodwin

Copy link
Copy Markdown
Contributor

Any reason not to make this a property on AWS.Lambda.FunctionProps? Alchemy supports circular dependencies, so I think there's less reason to model this as a separate resource.

@mineiro

mineiro commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Makes sense for the function-level case. One catch I noticed is that Lambda async config can also be scoped to a qualifier, so aliases/versions can have their own config.

Would you prefer this PR to only cover FunctionProps.eventInvokeConfig, and leave alias-specific config for a follow-up on AWS.Lambda.Alias?

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