DEV Community


Discussion on: Building an AWS Lambda extension with Rust

klaatu01 profile image
Charlie Ede

Hey Duarte great post!
I have implemented something similar myself, but I can manage to get my extension to start running. It would be great to see the source code, To check I have my file structures right.

duarten profile image
Duarte Nunes Author • Edited

Thanks! :)

Here's a gist with the extension code:

When you package the Lambda layer, the extension executable must be named the same as what it passed to the Register API, and it must be in the "extensions" folder. For example:

❯ unzip -l target/lambda/release/
Archive:  target/lambda/release/
  Length      Date    Time    Name
---------  ---------- -----   ----
  7778472  11-04-2020 17:18   extensions/sidecar
---------                     -------
  7778472                     1 file
Enter fullscreen mode Exit fullscreen mode

I can provide the CDK code as a gist too, but it's pretty much the same as what's in the post :)