Skip to content

Error in Strands Agents on Lambda #64

@foxxqin

Description

@foxxqin

I was using an clean EC2 instance running Amazon Linux 2023 and following the instruction to deploy a Strands Agent on Lambda function: https://github.com/strands-agents/docs/blob/main/docs/examples/cdk/deploy_to_lambda/README.md

I was able to successfully deploy the stack following the instruction but I tried to invoke the Lambda using the payload:

{
  "prompt": "What is the weather in New York?"
}

I got the following error:

{
  "errorMessage": "Unable to import module 'agent_handler': No module named 'pydantic_core._pydantic_core'",
  "errorType": "Runtime.ImportModuleError",
  "requestId": "",
  "stackTrace": []
}

It seems the layer "DependenciesLayerxxxxx" got incompatible versions.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions