-
Notifications
You must be signed in to change notification settings - Fork 16
feat: Support snapstart's vended credentials #532
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
Conversation
| PlatformRestoreStart { | ||
| // function name and function version are here | ||
| // but we don't care about those | ||
| // https://docs.aws.amazon.com/lambda/latest/dg/telemetry-schema-reference.html#platform-restoreStart | ||
| // runtime version may be nice | ||
| }, | ||
|
|
||
| #[serde(rename = "platform.restoreReport", rename_all = "camelCase")] | ||
| PlatformRestoreReport { | ||
| /// Status of the invocation | ||
| status: Status, | ||
| /// When unsuccessful, the `error_type` describes what kind of error occurred | ||
| error_type: Option<String>, | ||
| }, | ||
| #[serde(rename = "platform.restoreRuntimeDone", rename_all = "camelCase")] | ||
| PlatformRestoreRuntimeDone { |
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.
Maybe we could provide some snapstart visibility eventually? seems easy enough
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 we could report the metric, yeah
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.
Even create a span
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.
Why? It happens up to 2 weeks before an invocation occurs
|
Looks good! Fix clippy and |
Lambda SnapStart doesn't provide AWS access credentials to prevent them from being cached during the snapshot creation process.
We have two options, we can delay resolving credentials into the invoke phase (probably don't wanna do that for performance reasons where users rely on the additional vCPU power during init), or we can use the credential API to grab creds during init and use them.
Since we never re-use credentials, this works fine for us. It should only incur overhead during snapshot creation, which is a control plane operation anyway.
Screenshot of the decrypted secrets w/ snapshot (long since expired):

(can't wait for a bot to try these old expired creds)