-
Notifications
You must be signed in to change notification settings - Fork 239
#220 Fix case-sensitivity of HTTP headers in models #298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
parawanderer
wants to merge
22
commits into
aws:events-v4-serialization-v2
from
parawanderer:fix_headers_insensitive
Closed
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
46ec9fa
fix issue #220, using treemap
jeromevdl 8e5bbb9
use case insensitive headers in all events
jeromevdl 28333c0
refactor + headers in websocket event
jeromevdl f3e80cc
corrections after real test
jeromevdl d997cfe
remove sysout
jeromevdl 72a0ecf
revert http headers
jeromevdl 6e1a2b0
Merge branch 'master' into fix_headers_insensitive
jeromevdl 4569e72
Merge branch 'master' into fix_headers_insensitive
parawanderer fdfaf16
#220 Fix header case sensitivity (updated #234)
parawanderer 06d1ebf
Fix os compatibility test local builds on arm64 hosts (#338)
zsombor-balogh 445f5c3
Add support for tumbling windows events serialization (#342)
zsombor-balogh 65169c1
Update readme (#347)
msailes bca2340
Optimize jar discovery (#350)
richarddd 2d378d4
Bump gson from 2.8.5 to 2.8.9 in /aws-lambda-java-serialization (#341)
dependabot[bot] 0979b62
Bump jackson-databind in /aws-lambda-java-serialization (#323)
dependabot[bot] bdd625a
Bump jackson-databind in /aws-lambda-java-events (#322)
dependabot[bot] e865e54
Update Curl to 7.84.0 (#354)
SukanyaHanumanthu 3677d0c
removed unnecessary usage of `public` on interface methods (#172)
jccarrillo 4ac4272
Merge branch 'master' into fix_headers_insensitive
parawanderer acc62d1
implement PR feedback changes
parawanderer 897c757
implement PR feedback changes
parawanderer f0de734
Merge branch "events-v4-serialization-v2"; update usages of HttpHeaders
parawanderer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,130 +1,165 @@ | ||
# AWS Lambda Java Support Libraries | ||
Interface definitions for Java code running on the AWS Lambda platform. | ||
Key libraries for running Java on the AWS Lambda platform. | ||
|
||
For issues and questions, you can start with our [FAQ](https://aws.amazon.com/lambda/faqs/) | ||
and the [AWS forums](https://forums.aws.amazon.com/forum.jspa?forumID=186) | ||
and the AWS questions and answer site [re:Post](https://repost.aws/tags/TA5uNafDy2TpGNjidWLMSxDw/aws-lambda) | ||
|
||
To get started writing AWS Lambda functions in Java, check out the [official documentation](http://docs.aws.amazon.com/lambda/latest/dg/java-gs.html). | ||
To get started writing Lambda functions in Java, check out the official [developer guide](https://docs.aws.amazon.com/lambda/latest/dg/lambda-java.html). | ||
|
||
# Disclaimer of use | ||
For information on how to optimize your functions watch the re:Invent talk [Optimize your Java application on AWS Lambda](https://www.youtube.com/watch?v=sVJOJUD0fhQ). | ||
|
||
Each of the supplied packages should be used without modification. Removing | ||
dependencies, adding conflicting dependencies, or selectively including classes | ||
from the packages can result in unexpected behavior. | ||
## Core Java Lambda interfaces - aws-lambda-java-core | ||
|
||
# Release Notes | ||
This package defines the Lambda [Context](http://docs.aws.amazon.com/lambda/latest/dg/java-context-object.html) object | ||
as well as [interfaces](http://docs.aws.amazon.com/lambda/latest/dg/java-handler-using-predefined-interfaces.html) that Lambda accepts. | ||
|
||
Check out the per-module release notes: | ||
- [aws-lambda-java-core](aws-lambda-java-core/RELEASE.CHANGELOG.md) | ||
- [aws-lambda-java-events](aws-lambda-java-events/RELEASE.CHANGELOG.md) | ||
- [aws-lambda-java-events-sdk-transformer](aws-lambda-java-events-sdk-transformer/RELEASE.CHANGELOG.md) | ||
- [aws-lambda-java-log4j2](aws-lambda-java-log4j2/RELEASE.CHANGELOG.md) | ||
- [aws-lambda-java-runtime-interface-client](aws-lambda-java-runtime-interface-client/RELEASE.CHANGELOG.md) | ||
- [aws-lambda-java-serialization](aws-lambda-java-serialization/RELEASE.CHANGELOG.md) | ||
- [aws-lambda-java-test](aws-lambda-java-tests/RELEASE.CHANGELOG.md) | ||
- [Release Notes](aws-lambda-java-core/RELEASE.CHANGELOG.md) | ||
|
||
# Where to get packages | ||
___ | ||
Example request handler | ||
|
||
```java | ||
public class Handler implements RequestHandler<Map<String, String>, String>{ | ||
@Override | ||
public String handleRequest(Map<String, String> event, Context context) { | ||
|
||
} | ||
} | ||
``` | ||
|
||
[Maven](https://maven.apache.org) | ||
Example request stream handler | ||
|
||
```java | ||
public class HandlerStream implements RequestStreamHandler { | ||
@Override | ||
public void handleRequest(InputStream inputStream, OutputStream outputStream, Context context) throws IOException { | ||
|
||
} | ||
} | ||
``` | ||
|
||
```xml | ||
<dependency> | ||
<groupId>com.amazonaws</groupId> | ||
<artifactId>aws-lambda-java-core</artifactId> | ||
<version>1.2.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.amazonaws</groupId> | ||
<artifactId>aws-lambda-java-events</artifactId> | ||
<version>3.11.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.amazonaws</groupId> | ||
<artifactId>aws-lambda-java-events-sdk-transformer</artifactId> | ||
<version>3.1.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.amazonaws</groupId> | ||
<artifactId>aws-lambda-java-log4j2</artifactId> | ||
<version>1.5.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.amazonaws</groupId> | ||
<artifactId>aws-lambda-java-runtime-interface-client</artifactId> | ||
<version>2.1.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.amazonaws</groupId> | ||
<artifactId>aws-lambda-java-tests</artifactId> | ||
<version>1.1.1</version> | ||
<scope>test</scope> | ||
<groupId>com.amazonaws</groupId> | ||
<artifactId>aws-lambda-java-core</artifactId> | ||
<version>1.2.1</version> | ||
</dependency> | ||
``` | ||
|
||
[Gradle](https://gradle.org) | ||
## Java objects of Lambda event sources - aws-lambda-java-events | ||
|
||
```groovy | ||
'com.amazonaws:aws-lambda-java-core:1.2.1' | ||
'com.amazonaws:aws-lambda-java-events:3.11.0' | ||
'com.amazonaws:aws-lambda-java-events-sdk-transformer:3.1.0' | ||
'com.amazonaws:aws-lambda-java-log4j2:1.5.1' | ||
'com.amazonaws:aws-lambda-java-runtime-interface-client:2.1.1' | ||
'com.amazonaws:aws-lambda-java-tests:1.1.1' | ||
``` | ||
This package defines [event sources](http://docs.aws.amazon.com/lambda/latest/dg/intro-invocation-modes.html) that Lambda natively accepts. | ||
See the [documentation](aws-lambda-java-events/README.md) for a list of currently supported event sources. | ||
Using this library you can have Java objects which represent event sources. | ||
|
||
[Leiningen](http://leiningen.org) | ||
For example an SQS event: | ||
|
||
```clojure | ||
[com.amazonaws/aws-lambda-java-core "1.2.1"] | ||
[com.amazonaws/aws-lambda-java-events "3.11.0"] | ||
[com.amazonaws/aws-lambda-java-events-sdk-transformer "3.1.0"] | ||
[com.amazonaws/aws-lambda-java-log4j2 "1.5.1"] | ||
[com.amazonaws/aws-lambda-java-runtime-interface-client "2.1.1"] | ||
[com.amazonaws/aws-lambda-java-tests "1.1.1"] | ||
```java | ||
import com.amazonaws.services.lambda.runtime.events.SQSEvent; | ||
|
||
public class SqsHandler implements RequestHandler<SQSEvent, String> { | ||
|
||
@Override | ||
public String handleRequest(SQSEvent event, Context context) { | ||
|
||
} | ||
} | ||
``` | ||
|
||
[sbt](http://www.scala-sbt.org) | ||
- [Release Notes](aws-lambda-java-events/RELEASE.CHANGELOG.md) | ||
|
||
```scala | ||
"com.amazonaws" % "aws-lambda-java-core" % "1.2.1" | ||
"com.amazonaws" % "aws-lambda-java-events" % "3.11.0" | ||
"com.amazonaws" % "aws-lambda-java-events-sdk-transformer" % "3.1.0" | ||
"com.amazonaws" % "aws-lambda-java-log4j2" % "1.5.1" | ||
"com.amazonaws" % "aws-lambda-java-runtime-interface-client" % "2.1.1" | ||
"com.amazonaws" % "aws-lambda-java-tests" % "1.1.1" | ||
```xml | ||
<dependency> | ||
<groupId>com.amazonaws</groupId> | ||
<artifactId>aws-lambda-java-events</artifactId> | ||
<version>3.11.0</version> | ||
</dependency> | ||
``` | ||
|
||
# Using aws-lambda-java-core | ||
## Java Lambda JUnit Support - aws-lambda-java-tests | ||
|
||
This package defines the Lambda [Context](http://docs.aws.amazon.com/lambda/latest/dg/java-context-object.html) object | ||
as well as [interfaces](http://docs.aws.amazon.com/lambda/latest/dg/java-handler-using-predefined-interfaces.html) that Lambda accepts. | ||
This package provides utils to ease Lambda Java testing. It uses the same Lambda serialisation logic and `aws-lambda-java-events` to inject events in your JUnit tests. | ||
|
||
- [Release Notes](aws-lambda-java-tests/RELEASE.CHANGELOG.md) | ||
|
||
# Using aws-lambda-java-events | ||
```java | ||
@ParameterizedTest | ||
@Event(value = "sqs/sqs_event.json", type = SQSEvent.class) | ||
public void testInjectSQSEvent(SQSEvent event) { | ||
... | ||
} | ||
``` | ||
|
||
This package defines [event sources](http://docs.aws.amazon.com/lambda/latest/dg/intro-invocation-modes.html) that AWS Lambda natively accepts. | ||
See the [documentation](aws-lambda-java-events/README.md) for more information. | ||
```xml | ||
<dependency> | ||
<groupId>com.amazonaws</groupId> | ||
<artifactId>aws-lambda-java-tests</artifactId> | ||
<version>1.1.1</version> | ||
<scope>test</scope> | ||
</dependency> | ||
``` | ||
|
||
# Using aws-lambda-java-events-sdk-transformer | ||
## aws-lambda-java-events-sdk-transformer | ||
|
||
This package provides helper classes/methods to use alongside `aws-lambda-java-events` in order to transform | ||
Lambda input event model objects into SDK-compatible output model objects. | ||
Lambda input event model objects into SDK-compatible output model objects. | ||
See the [documentation](aws-lambda-java-events-sdk-transformer/README.md) for more information. | ||
|
||
# Using aws-lambda-java-log4j2 | ||
- [Release Notes](aws-lambda-java-events-sdk-transformer/RELEASE.CHANGELOG.md) | ||
|
||
This package defines the Lambda adapter to use with log4j version 2. | ||
```xml | ||
<dependency> | ||
<groupId>com.amazonaws</groupId> | ||
<artifactId>aws-lambda-java-events-sdk-transformer</artifactId> | ||
<version>3.1.0</version> | ||
</dependency> | ||
``` | ||
|
||
## Java Lambda Log4J2 support - aws-lambda-java-log4j2 | ||
|
||
This package defines the Lambda adapter to use with Log4J version 2. | ||
See the [README](aws-lambda-java-log4j2/README.md) or the [official documentation](http://docs.aws.amazon.com/lambda/latest/dg/java-logging.html#java-wt-logging-using-log4j) for information on how to use the adapter. | ||
|
||
# Using aws-lambda-java-runtime-interface-client | ||
- [Release Notes](aws-lambda-java-log4j2/RELEASE.CHANGELOG.md) | ||
|
||
```xml | ||
<dependency> | ||
<groupId>com.amazonaws</groupId> | ||
<artifactId>aws-lambda-java-log4j2</artifactId> | ||
<version>1.5.1</version> | ||
</dependency> | ||
``` | ||
|
||
## Java implementation of the Runtime Interface Client API - aws-lambda-java-runtime-interface-client | ||
|
||
This package defines the Lambda Java Runtime Interface Client package, a Lambda Runtime component that starts the runtime and interacts with the Runtime API - i.e., it calls the API for invocation events, starts the function code, calls the API to return the response. | ||
The purpose of this package is to allow developers to deploy their applications in Lambda under the form of Container Images. See the [README](aws-lambda-java-runtime-interface-client/README.md) for information on how to use the library. | ||
|
||
# Using aws-lambda-java-serialization | ||
- [Release Notes](aws-lambda-java-runtime-interface-client/RELEASE.CHANGELOG.md) | ||
|
||
```xml | ||
<dependency> | ||
<groupId>com.amazonaws</groupId> | ||
<artifactId>aws-lambda-java-runtime-interface-client</artifactId> | ||
<version>2.1.1</version> | ||
</dependency> | ||
``` | ||
|
||
## Java Lambda provided serialization support - aws-lambda-java-serialization | ||
|
||
This package defines the Lambda serialization logic using in the aws-lambda-java-runtime-client library. It has no current standalone usage. | ||
This package defines the Lambda serialization logic using in the `aws-lambda-java-runtime-client` library. It has no current standalone usage. | ||
|
||
# Using aws-lambda-java-tests | ||
- [Release Notes](aws-lambda-java-serialization/RELEASE.CHANGELOG.md) | ||
|
||
This package provides utils to ease Lambda Java testing. Used with `aws-lambda-java-serialization` and `aws-lambda-java-events` to inject events in your JUnit tests. | ||
```xml | ||
<dependency> | ||
<groupId>com.amazonaws</groupId> | ||
<artifactId>aws-lambda-java-serialization</artifactId> | ||
<version>1.0.0</version> | ||
</dependency> | ||
``` | ||
|
||
## Disclaimer of use | ||
|
||
Each of the supplied packages should be used without modification. Removing | ||
dependencies, adding conflicting dependencies, or selectively including classes | ||
from the packages can result in unexpected behavior. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.