Micronaut ❤️ AWS Lambda 🛠

Challenge

Solution

  1. To figure out which ‘beans’ can be injected head over to the API summary at
    https://micronaut-projects.github.io/micronaut-aws/1.4.1/api/index.html?overview-summary.html
  2. Search for the types you are interested in. Ie. the AwsProxyRequestContext
  3. Confirm that there is a matching ArgumentBinder type — actually something that implements io.micronaut.http.bind.bindesr.TypedRequestArgumentBinder
  4. Use such a type in your Micronaut Lambda:
@Put("/{id}")
public HttpResponse update(
@PathVariable("id") String id,
@Body MyRequest request,
AwsProxyRequestContext context) {
  • com.amazonaws.serverless.proxy.model.AwsProxyRequestContext
  • io.micronaut.http.BasicAuth
  • com.amazonaws.services.lambda.runtime.Context
  • For the body:
    - io.reactivex.Maybe
    - java.util.concurrent.CompletableFuture
    - io.micronaut.http.server.multipart.MultipartBody
    - io.reactivex.Observable
    - org.reactivestreams.Publisher
    - io.reactivex.Single
@Controller("/api/db/")
public class ServerController {
@Inject private DynamoDBServiceImpl dynamoDBService;

--

--

--

CloudSpout.io serves to channel the power of the Cloud for today’s business & tomorrow’s growth.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

parser and Types of parser(Top down and Bottom-up parser)

SEQUENCE IN SQL SERVER

Framework: Thrusters

Is It Too Late To Learn How To Code? The Honest Truth

One Script to Rule Them All — Modular Power Up System using switch statement

FLUTTER WEBVIEW TUTORIAL #3 — Convert a website to an app using flutter.

Advantage Data Vault 2.0

“Postman” To Deliver (upload) Video

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
CloudSpout

CloudSpout

CloudSpout.io serves to channel the power of the Cloud for today’s business & tomorrow’s growth.

More from Medium

AWS Lambda Function Use Case

Create a Background Job Service with DynamoDB Streams and Lambda Functions with “Serverless”…

AWS Serverless or Lambda, S3 uses .

Add custom layer to AWS Lambda