The English version of quarkus.io is the official project site. Translated sites are community supported on a best-effort basis.

Funqy HTTP Binding with AWS Lambda 

If you want to allow HTTP clients to invoke on your Funqy functions on AWS Lambda, Quarkus allows you to expose multiple Funqy functions through HTTP deployed as one AWS Lambda. This approach does add overhead over the regular Funqy AWS Lambda integration and also requires you to use AWS API Gateway.

这项技术被认为是preview。

preview(预览) 中,不保证向后兼容和在生态系统中的存在。具体的改进可能需要改变配置或API,并且正在计划变得 稳定 。欢迎在我们的 邮件列表 中提供反馈,或在我们的 GitHub问题列表 中提出问题。

For a full list of possible statuses, check our FAQ entry.

Follow the AWS Lambda Http Guide. It walks through using a variety of HTTP frameworks on AWS Lambda, including Funqy.

The Funqy HTTP + AWS Lambda binding is not a replacement for REST over HTTP. Because Funqy needs to be portable across a lot of different protocols and function providers its HTTP binding is very minimalistic and you will lose REST features like linking and the ability to leverage HTTP features like cache-control and conditional GETs. You may want to consider using Quarkus’s Jakarta REST, Spring MVC, or Vert.x Web Reactive Route support instead. They also work with Quarkus and AWS Lambda.

An additional Quickstart

Beyond generating an AWS project that is covered in the AWS Lambda Http Guide, there’s also a quickstart for running Funqy HTTP on AWS Lambda.

克隆 Git 仓库: git clone https://github.com/quarkusio/quarkus-quickstarts.git ,或者下载 存档

The solution is located in the funqy-amazon-lambda-quickstart directory.

The Code

There is nothing special about the code and more importantly nothing AWS specific. Funqy functions can be deployed to many environments and AWS Lambda is one of them. The Java code is actually the same exact code as the funqy-http-quickstart.

入门指南

The steps to get this quickstart running are exactly the same as defined in the AWS Lambda HTTP Guide. These differences are that you are running from a quickstart and the maven dependencies are slightly different.

pom.xml
<dependency>
    <groupId>io.quarkus</groupId>
    <artifactId>quarkus-funqy-http</artifactId>
</dependency>
<dependency>
    <groupId>io.quarkus</groupId>
    <artifactId>quarkus-amazon-lambda-http</artifactId>
</dependency>
build.gradle
implementation("io.quarkus:quarkus-funqy-http")
implementation("io.quarkus:quarkus-amazon-lambda-http")

Related content