Quarkus CDK Java Lambda Template Supports Amazon API Gateway HTTP APIs

The sample / template with the concise name "MicroProfile with Quarkus as AWS Lambda Function deployed with Cloud Development Kit (CDK) v2 for Java (https://github.com/AdamBien/aws-quarkus-lambda-cdk-plain)" was extended to support Amazon API Gateway HTTP APIs in addition to the REST APIs.

The template ships now with Amazon API Gateway HTTP APIs AWS Lambda integration as default configuration and can be changed to REST API by adding the extension quarkus-amazon-lambda-rest:


<dependency>
    <groupId>io.quarkus</groupId>
    <artifactId>quarkus-amazon-lambda-rest</artifactId>
</dependency>

...and removing the:


<dependency>
    <groupId>io.quarkus</groupId>
    <artifactId>quarkus-amazon-lambda-http</artifactId>
</dependency>
You will also have to set the flag var httpAPIGatewayIntegration = true; in:

public class CDKApp {
    public static void main(final String[] args) {

            var app = new App();
            var appName = "quarkus-apigateway-lambda-cdk";
            //...
            var httpAPIGatewayIntegration = true;
            new CDKStack(app, appName, true);
            app.synth();
        }
}
    

Also checkout the comparison between the Amazon API Gateway HTTP APIs and REST APIs

Amazon API Gateway HTTP APIs is less expensive, faster, and supports more use cases except for Private API, where you will still have to rely on the REST APIs.

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
Online Workshops
...the last 150 posts
...the last 10 comments
License