Skip to content

Bug: pydantic platform incompatibility when using layer for arm64 lambda #6771

Closed
@nosta33

Description

@nosta33

Expected Behaviour

When developing an AWS lambda configured with arm64 architecture, and using AWS Powertools implemented with layer arn:aws:lambda:eu-west-1:017000801446:layer:AWSLambdaPowertoolsPythonV3-python313-arm64:7, all packages and dependencies are correctly installed with the right platform configuration.

Current Behaviour

When developing an AWS lambda configured with arm64 architecture, and using AWS Powertools implemented with layer arn:aws:lambda:eu-west-1:017000801446:layer:AWSLambdaPowertoolsPythonV3-python313-arm64:7, my lambda immediately crashes raising the error : no module named 'pydantic_core._pydantic_core'.

Code snippet

Run a lambda with arm64 architecture and layer arn:aws:lambda:eu-west-1:017000801446:layer:AWSLambdaPowertoolsPythonV3-python313-arm64:7

Possible Solution

When looking at the pydantic package, I see :

Image

which shows that the architecture is x86 and not arm64.

Steps to Reproduce

Run a lambda with arm64 architecture and layer arn:aws:lambda:eu-west-1:017000801446:layer:AWSLambdaPowertoolsPythonV3-python313-arm64:7

Powertools for AWS Lambda (Python) version

latest

AWS Lambda function runtime

3.13

Packaging format used

Lambda Layers

Debugging logs

Metadata

Metadata

Labels

cant-reproduceAny issues that cannot be reproduced

Type

No type

Projects

Status

Coming soon

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions