title: Spring Cloud Function-suitable for REST API? How to access GET path params?
body: <p>I'm new to WebFlux and Serverless. I'm trying to create a REST API as Serverless via AWS API gateway.</p>
  
  <p>The flow would be API Gateway --> Lambda --> DynamoDB</p>
  
  <p>In order to achieve the API flow, would the Spring Cloud Function be the best choice? I found <a href="https://github.com/awslabs/aws-serverless-java-container" rel="noreferrer">aws-serverless-java-container</a> does the job seamlessly(wrapper of converting the event to http request/response)</p>
  
  <p>I've gone through the documentation on <a href="http://cloud.spring.io/spring-cloud-function/single/spring-cloud-function.html" rel="noreferrer">http://cloud.spring.io/spring-cloud-function/single/spring-cloud-function.html</a> and few examples found in <a href="https://github.com/spring-cloud/spring-cloud-function" rel="noreferrer">https://github.com/spring-cloud/spring-cloud-function</a>.
  But still, I'm not convinced on whether with Spring Cloud Function I would be able to achieve the API flavor.</p>
  
  <pre><code>@Bean
  //How path or query params can be mapped?
  public Function&lt;Flux&lt;String&gt;, Flux&lt;String&gt;&gt; getEmployeeDetails() {
   // business logic goes here
  }
  </code></pre>
  
  <p>In the above snippet, how to achieve the GET request/response model. If my endpoint has /{dept}/{employee}/{name}, how Spring cloud function accepts the path params in GET request?</p>
  
  <p>Any pointers would be helpful.</p>