Skip to content

Using SnapStart for .NET8 throws InvalidStateTransition #1879

Answered by tmitchel2
tmitchel2 asked this question in Q&A
Discussion options

You must be logged in to vote

Ok so I've resolved the issue, the LAMBDA_RUNTIMESUPPORT_DEBUG was very helpful so I appreciate you pointing that out to me.

My issue arose because I was using a Executable Assembly style but my cdk handler was configured for Class Library approach. Interestingly that still worked with snapstart disabled and thats what caused the confusion. When SnapStart was enabled, it would take over and it would search for a constructor that wasnt there in the LambdaEntryPoint, and thus wouldnt register the hooks and wouldnt run any of my code.

TLDR I made some other changes, but the main fix for me was to update my handler to the execution assembly style:

handler: "Destash.Server"

Replies: 1 comment 11 replies

Comment options

You must be logged in to vote
11 replies
@bhallasaksham
Comment options

@bhallasaksham
Comment options

@tmitchel2
Comment options

@tmitchel2
Comment options

Answer selected by tmitchel2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants