Maybe someone help me with a question.
I'm trying to use Quarkus JVM to deploy lambda functions in AWS. But I cannot set a layer using the function.zip genereated by Quarkus when I use "mvn clean package".
When I set directly on each function, "function.zip" works.
Like the following:
Globals:
Function:
Tracing: Active
CodeUri: target/function.zip
Handler: io.quarkus.amazon.lambda.runtime.QuarkusStreamHandler::handleRequest
Runtime: java17
Timeout: 30
MemorySize: 1024
But I would like to use a layer resource and use it the layer in the lambda function.
For example:
LambdaLayer:
Type: AWS::Serverless::LayerVersion
Properties:
LayerName: Quarkus-Layer
Description: QuarkusLayer
ContentUri: target/function.zip
CompatibleRuntimes:
- java17
CompatibleArchitectures:
- x86_64
LicenseInfo: MIT
And I reference that layer in the lambda resource:
Globals:
Function:
Tracing: Active
CodeUri: target/empty-function.zip
Handler: io.quarkus.amazon.lambda.runtime.QuarkusStreamHandler::handleRequest
Runtime: java17
Timeout: 30
MemorySize: 1024
Layers:
- !Ref LambdaLayer
But If I use layers it doesn't work, Can't find quarkus handling class.
And again, when I set direct "function.zip" directly on each lambda or globally it works great. But I feel like it's not efficient to use it that way, I'd like to use layers.
I've searched GitHub for similar projects and they all use directly in each function they don't use layers.