aws-samples / aws-lambda-extensions

A collection of sample extensions to help you get started with AWS Lambda Extensions
MIT No Attribution
442 stars 145 forks source link

ARM64 #57

Closed aterreno closed 2 years ago

aterreno commented 2 years ago

Am I right in saying that the lambda extension layer won't work on ARM64/graviton processors?

Thanks

julianwood commented 2 years ago

A Lambda extension layer is just files. If the files within the layer are compatible with ARM64/Graviton2 then the extension will work. Interpreted languages like Node/Python work without modification. If you're building extensions using binaries, these will need to be rebuild for arm64.

aterreno commented 2 years ago

thanks @julianwood - I tried the lambda extension layer some time ago (in combination with datadog layer) and I had issues

we got back:

fork/exec /opt/extensions/cloudwatch_lambda_agent: exec format error

Although this might not be the right repository, I can't find where else I should raise this with AWS

julianwood commented 2 years ago

Are you using CloudWatch Lambda Insights? The extension for this was only updated yesterday to work with Graviton2. Currently we're waiting for CloudFormation and CDK/SAM support to be rolled out. You should be able to deselect in the console and select again which will add the correct Graviton2 supported Lambda layer.

aterreno commented 2 years ago

Oh amazing news, I had to remove it to be able to move all our lambdas to Graviton

aterreno commented 2 years ago

Just in case anyone else stumbles here and they are using terraform or pulumi to manage their infra, the arn for the layer is:

arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension-Arm64:1

or whatever region your lambda is deployed into :)

julianwood commented 2 years ago

Thanks, glad you're sorted!