Custom Sharp Layer
This lambda uses the Sharp layer from https://github.com/samvera-labs/sharp-jp2-lambda-layer (opens in a new tab) in order to get a version of Sharp with jp2 support.
You can build your own local version using that code and then deploy your own layer and set that layer in your SAM template.