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

Funqy HTTPバインディングとAWS Lambda

HTTPクライアントがAWS Lambda上のFunqy関数を呼び出すことを許可したい場合、Quarkusでは、1つのAWS LambdaとしてデプロイされたHTTPを通して複数のFunqy関数を公開することができます。この方法では、通常のFunqy AWS Lambdaの統合よりもオーバーヘッドが追加され、AWS API Gatewayを使用する必要があります。

この技術は、previewと考えられています。

preview では、下位互換性やエコシステムでの存在は保証されていません。具体的な改善には設定や API の変更が必要になるかもしれませんが、 stable になるための計画は現在進行中です。フィードバックは メーリングリストGitHub の課題管理 で受け付けています。

とりうるステータスの完全なリストについては、 FAQの項目 を参照してください。

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.

追加のクイックスタート

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.

コード

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")

関連コンテンツ