GH-861 Add constant for aws-context

Resolves #861
This commit is contained in:
Oleg Zhurakousky
2022-04-21 13:16:02 +02:00
parent 5e1b8d3912
commit 047c0b1e6d
2 changed files with 10 additions and 1 deletions

View File

@@ -37,6 +37,13 @@ public class FuncApplication implements ApplicationContextInitializer<GenericApp
}
```
== 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
you can simply have `Message<YourPojo>` as an input parameter to your function and then access `aws-context` from message headers.
For convenience we provide AWSLambdaUtils.AWS_CONTEXT constant.
== Platform Specific Features
=== HTTP and API Gateway