Skip to content

Commit

Permalink
Switch dependency versions
Browse files Browse the repository at this point in the history
Issue with getting headers and request data in
aws-serverless-java-container-core:1.2 - looks like it may be fixed in
1.3 but it is not out yet.
  • Loading branch information
pfreitag committed Dec 4, 2018
1 parent 905f98a commit 5ed23f7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repositories {

dependencies {
compile (
'com.amazonaws.serverless:aws-serverless-java-container-core:1.2',
'com.amazonaws.serverless:aws-serverless-java-container-core:1.1.4',
'javax.servlet.jsp:javax.servlet.jsp-api:2.3.1',
'javax.el:javax.el-api:3.0.0',
'com.amazonaws:aws-lambda-java-core:1.2.0',
Expand Down
12 changes: 12 additions & 0 deletions cfml/app/Application.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,16 @@ component {
getLambdaContext().getLogger().log(arguments.msg);
}

public string function getRequestID() {
if (isNull(getLambdaContext())) {
//not running in lambda
if (!request.keyExists("_request_id")) {
request._request_id = createUUID();
}
return request._request_id;
} else {
return getLambdaContext().getAwsRequestId();
}
}

}

0 comments on commit 5ed23f7

Please sign in to comment.