Fix indentation for all pages
This commit is contained in:
@@ -4,12 +4,12 @@
|
||||
The https://aws.amazon.com/[AWS] adapter takes a Spring Cloud Function app and converts it to a form that can run in AWS Lambda.
|
||||
|
||||
[[introduction]]
|
||||
== Introduction
|
||||
= Introduction
|
||||
|
||||
include::adapters/aws-intro.adoc[]
|
||||
|
||||
[[functional-bean-definitions]]
|
||||
== Functional Bean Definitions
|
||||
= Functional Bean Definitions
|
||||
|
||||
Your functions will start much quicker if you can use functional bean definitions instead of `@Bean`. To do this make your main class
|
||||
an `ApplicationContextInitializer<GenericApplicationContext>` and use the `registerBean()` methods in `GenericApplicationContext` to
|
||||
@@ -40,7 +40,7 @@ public class FuncApplication implements ApplicationContextInitializer<GenericApp
|
||||
```
|
||||
|
||||
[[aws-context]]
|
||||
== AWS Context
|
||||
= AWS Context
|
||||
|
||||
In a typical implementation of AWS Handler user has access to AWS _context_ object. With function approach you can have the same experience if you need it.
|
||||
Upon each invocation the framework will add `aws-context` message header containing the AWS _context_ instance for that particular invocation. So if you need to access it
|
||||
@@ -48,10 +48,10 @@ you can simply have `Message<YourPojo>` as an input parameter to your function a
|
||||
For convenience we provide AWSLambdaUtils.AWS_CONTEXT constant.
|
||||
|
||||
[[platform-specific-features]]
|
||||
== Platform Specific Features
|
||||
= Platform Specific Features
|
||||
|
||||
[[http-and-api-gateway]]
|
||||
=== HTTP and API Gateway
|
||||
== HTTP and API Gateway
|
||||
|
||||
AWS has some platform-specific data types, including batching of messages, which is much more efficient than processing each one individually. To make use of these types you can write a function that depends on those types. Or you can rely on Spring to extract the data from the AWS types and convert it to a Spring `Message`. To do this you tell AWS that the function is of a specific generic handler type (depending on the AWS service) and provide a bean of type `Function<Message<S>,Message<T>>`, where `S` and `T` are your business data types. If there is more than one bean of type `Function` you may also need to configure the Spring Boot property `function.name` to be the name of the target bean (e.g. use `FUNCTION_NAME` as an environment variable).
|
||||
|
||||
@@ -68,7 +68,7 @@ The supported AWS services and generic handler types are listed below:
|
||||
For example, to deploy behind an API Gateway, use `--handler org.springframework.cloud.function.adapter.aws.SpringBootApiGatewayRequestHandler` in your AWS command line (in via the UI) and define a `@Bean` of type `Function<Message<Foo>,Message<Bar>>` where `Foo` and `Bar` are POJO types (the data will be marshalled and unmarshalled by AWS using Jackson).
|
||||
|
||||
[[custom-runtime]]
|
||||
== Custom Runtime
|
||||
= Custom Runtime
|
||||
|
||||
You can also benefit from https://docs.aws.amazon.com/lambda/latest/dg/runtimes-custom.html[AWS Lambda custom runtime] feature of AWS Lambda
|
||||
and Spring Cloud Function provides all the necessary components to make it easy.
|
||||
|
||||
Reference in New Issue
Block a user