Skip to content

Support Durable Execution SDK #1460

@willfarrell

Description

@willfarrell

Lambda now supports a new SDK for Durable Executions (https://github.com/aws/aws-durable-execution-sdk-js). Would be great to use this with LLRT.

Depends on: #1170

import middy from "@middy/core";
import { executionModeDurableContext } from '@middy/core/DurableContext'

const lambdaHandler = async (event, context, {signal}) => {
  const response = await context.step(async()=>{
	return 1
  })
  
  return response
}

export const handler = middy({ executionMode: executionModeDurableContext }).handler(lambdaHandler)

Returns SyntaxError: Could not find export 'AsyncLocalStorage' in module 'async_hooks' when running after compile.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions