Skip to content

Conversation

@jlosaws
Copy link

@jlosaws jlosaws commented Dec 15, 2025

Initial commit of new durable function pattern using typescript. Demonstrates checkpointing, parallel and waitforcallback checkpoints and integrates with Amazon Bedrock AgentCore

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ellisms
Copy link
Contributor

ellisms commented Dec 16, 2025

Hi @jlosaws I started testing this pattern and the deployment fails with the following error:

__ Creating IAM role: bedrock-agentcore-runtime-fraud-role

An error occurred (MalformedPolicyDocument) when calling the CreateRole operation: This policy contains invalid Json
__ Agent deployment failed with exit code: 254

Also, the project should be written in one of the supported IaC frameworks - SAM, Terraform, CDK, etc.

@bfreiberg bfreiberg added the durable functions Pattern for AWS Lambda durable functions label Dec 17, 2025
@jlosaws
Copy link
Author

jlosaws commented Dec 17, 2025

Let me update it to SAM. SAM wasn't available when it was originally written, but I believe we support it directly now.

@jlosaws
Copy link
Author

jlosaws commented Dec 19, 2025

@ellisms - Published updated IaC with SAM. Docker to ECR and .zip files to S3 for Lambda FN and Layers remained in bash/CLI. I updated the README to reflect updates and provided manual instructions if they want to manually deploy the docker image/zip files and then run SAM.

@ellisms
Copy link
Contributor

ellisms commented Jan 6, 2026

Thanks @jlosaws. A few things before I start the in depth review:

  1. Can you ensure the README.md file follows the template.
  2. I don't think the deploy-sam.sh script is needed. SAM should be able to build the image and push to ECR for you. See the build docs. You should be able to do the entire deploy with sam deploy, and avoid the script and the manual setup.

@jlosaws
Copy link
Author

jlosaws commented Jan 6, 2026

  1. The README includes the same info and main headers but has more content than what's there. I can reduce if you want me to limit the additional context.

  2. The deploy-sam.sh is necessary as the users needs to build and upload the Docker image to ECR and also need to build and copy the Lambda packages to S3. These need to be done before they run Sam deploy

@ellisms
Copy link
Contributor

ellisms commented Jan 8, 2026

Is there a particular reason to create the layers instead of just a single zip file? SAM will build all the dependencies into a ZIP, and that eliminates the need for the layers and S3. My recommendation is to leverage SAM for the building/packaging into a single zip and remove all of the Lambda and S3 work in the script. I think you still need the script for the Agent build, and you can still run the sam build && sam deploy commands there too.

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

Labels

durable functions Pattern for AWS Lambda durable functions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants