Skip to content

Commit d3ab688

Browse files
committed
Fill out Java Context object bits.
1 parent 246d9c2 commit d3ab688

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

docs/environment.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,17 @@ function, we have not tried it out.
154154

155155
[predef]: http://docs.aws.amazon.com/lambda/latest/dg/java-handler-using-predefined-interfaces.html
156156

157-
### Context object
157+
### Logging
158+
159+
The [log4j and LambdaLogger
160+
styles](http://docs.aws.amazon.com/lambda/latest/dg/java-logging.html) that log
161+
to CloudWatch are not supported.
158162

159-
TODO
163+
### Context object
160164

165+
* `context.getFunctionName()` returns a String of the form of a docker image,
166+
for example `iron/test-function`.
167+
* `context.getFunctionVersion()` is always the string `"$LATEST"`.
168+
* `context.getAwsRequestId()` reflects the environment variable `TASK_ID` which is
169+
set to the task ID on IronWorker. If TASK_ID is empty, a new UUID is used.
170+
* `getInvokedFunctionArn()`, `getLogGroupName()`, `getLogStreamName()`, `getIdentity()`, `getClientContext()`, `getLogger()` return `null`.

0 commit comments

Comments
 (0)