Comments (6)
Hi Artyom,
confirming this behaviour. For SnapStart the runtime is initialized and then a snapshot is taken. After the snapshot is restored, the log stream is different, and there is no way it can be configured in an environment variable of already running process
from aws-lambda-java-libs.
Hi, @smirnoal
I see the point now,
Will we able to get log stream name from the context object passed to handler class?
Looking at com.amazonaws.services.lambda.runtime.Context , log stream name is exposed.
Thanks,
Artyom
from aws-lambda-java-libs.
Answering previous question:
- after snapshot restore, context.getLogStreamName returns null.
Please confirm, that there are no plans to inject logStreamName via LambdaContext object for SnapStart enabled published versions, and I will close this issue.
from aws-lambda-java-libs.
No, the Context object is a shortcut to read environment variable:
from aws-lambda-java-libs.
@smirnoal , thank you, I'm closing this issue.
from aws-lambda-java-libs.
what is the recommended way to distinguish Lambda instances within function?
you probably want to have a static UUID variable or a file in /tmp
storing instance id.
For the SnapStart use case, you'll need to create the ID in the RESTORE phase, unless your intention is to track snapshot usage
from aws-lambda-java-libs.
Related Issues (20)
- SnapStart Support HOT 9
- Announcement: default branch renaming
- The field "records" in SQSEvent should be renamed to "Records" HOT 4
- Support Event Step Function HOT 1
- Log issues when using the Quarkus Java framework HOT 6
- Simulate AWS runtime environment for lambda in local run. HOT 3
- KinesisEvent not parsed correctly HOT 2
- Incomplete and/or missing API Gateway Lambda Authorizer events HOT 5
- RequestStreamHandler not working as expect HOT 2
- AWS lamba core reactive types HOT 2
- EventLoader unable to correctly deserialize posted json body data for APIGateway events HOT 2
- Failed to serialize CognitoUserPoolPreTokenGenerationEvent HOT 7
- Support VPC Lattice event structure
- APIGatewayProxyRequestEvent$RequestIdentity missing "cognitoAmr" field HOT 2
- Unable to upgrade with newer Jackson - conflicting `com.fasterxml.jackson.annotation.JsonFormat` HOT 5
- SNSEvent Jackson mixins are Incomplete HOT 6
- Failed to deserialize DynamodbEvent.DynamodbStreamRecord#dynamodb HOT 6
- Support v2 of Pre Token Generation Lambda HOT 1
- AWS documentation says LambdaLogger will default to the INFO log level, but it is actually defaulting to UNDEFINED HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-lambda-java-libs.