Funqy HTTP Binding with Amazon Lambda
previewSe você deseja permitir que clientes HTTP invoquem suas funções Funqy no AWS Lambda, o Quarkus permite expor várias funções Funqy por meio de HTTP implantado como um AWS Lambda. Este método adiciona uma sobrecarga em relação à integração regular do Funqy com o AWS Lambda e também requer o uso do AWS API Gateway.
|
Essa tecnologia é considerada preview. In preview, backward compatibility and presence in the ecosystem is not guaranteed. Specific improvements might require changing configuration or APIs, and plans to become stable are under way. Feedback is welcome on our mailing list or as issues in our GitHub issue tracker. Para obter uma lista completa de possíveis status, consulte nosso FAQ. |
Follow the Amazon Lambda Http Guide. It walks through using a variety of HTTP frameworks on Amazon 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. |
Um Quickstart adicional
Beyond generating an AWS project that is covered in the Amazon Lambda Http Guide, there’s also a quickstart for running Funqy HTTP on AWS Lambda.
Clone o repositório Git: git clone -b 3.2 https://github.com/quarkusio/quarkus-quickstarts.git, ou baixe um arquivo.
A solução está localizada no diretório funqy-amazon-lambda-quickstart diretório.
O Código
Não há nada de especial no código e, mais importante, nada específico do AWS. As funções Funqy podem ser implementadas em muitos ambientes e o AWS Lambda é um deles. O código Java é, na verdade, exatamente o mesmo código que o funqy-http-quickstart .
Primeiros passos
The steps to get this quickstart running are exactly the same as defined in the Amazon Lambda HTTP Guide. These differences are that you are running from a quickstart and the maven dependencies are slightly different.
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-funqy-http</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-amazon-lambda-http</artifactId>
</dependency>
implementation("io.quarkus:quarkus-funqy-http")
implementation("io.quarkus:quarkus-amazon-lambda-http")