-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Use java 11. (blank-java, java-basic, java-events) #422
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
Changes from all commits
7ba155d
101eea3
2675a77
c8f10d2
6161f7e
234f0e4
74ec19d
95ff514
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,9 +7,9 @@ Resources: | |
Properties: | ||
CodeUri: target/blank-java-1.0-SNAPSHOT.jar | ||
Handler: example.Handler::handleRequest | ||
Runtime: java8 | ||
Runtime: java11 | ||
Description: Java function | ||
MemorySize: 512 | ||
MemorySize: 2048 | ||
Timeout: 10 | ||
# Function's execution role | ||
Policies: | ||
|
@@ -18,3 +18,13 @@ Resources: | |
- AWSXrayWriteOnlyAccess | ||
- AWSLambdaVPCAccessExecutionRole | ||
Tracing: Active | ||
Layers: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wouldn't make examples of Lambda functions using Layers for application dependencies There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It'd be good to provide one example of this, and I think blank-java is a good candidate for it. Some of the other languages in this repo show this pattern as well (Node, Python). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you provide an example of this, it absolutely should be in a separate example. This is not what I would expect from 'blank'. I would call it 'app-dependency-layer' or something similar. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blank does not mean "empty". You can get an empty function from the management console. It's a sample for demonstrating and testing service features. Layers is an important feature, no? |
||
- !Ref libs | ||
libs: | ||
Type: AWS::Serverless::LayerVersion | ||
Properties: | ||
LayerName: blank-java-lib | ||
Description: Dependencies for the blank-java sample app. | ||
ContentUri: build/blank-java-lib.zip | ||
CompatibleRuntimes: | ||
- java11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This dependency silently discards log messages. I don't think it's a good idea to use it for an example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually want to remove SLF4J from the dependencies and just use the context logger (SLF4J is required for the testing to work, so I include it for test context only). However, I can't do so because I think another AWS dependency that is pulling in SLF4J somewhere, causing this warning in logs (https://stackoverflow.com/questions/7421612/slf4j-failed-to-load-class-org-slf4j-impl-staticloggerbinder). The warning is resolved with this dependency. That being said, it's just a warning but I wanted all the output and logs to look as clean as possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to include a real implementation of slf4j backend. sl4j-simple for example.