Skip to content
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

Calling lambda from pre hook #34

Closed
orjan opened this issue Jun 26, 2018 · 1 comment
Closed

Calling lambda from pre hook #34

orjan opened this issue Jun 26, 2018 · 1 comment

Comments

@orjan
Copy link

orjan commented Jun 26, 2018

Hi and thanks for an awesome plugin!

Is there a way to get hold of a reference to the new lambda so it can be called and verified from the pre hook? Like NewVersion is being passed in implementing-safe-aws-lambda-deployments-with-aws-codedeploy

@davidgf
Copy link
Owner

davidgf commented Jun 26, 2018

Hey @orjan, thanks a lot for reaching out! I guess the question would be if you can figure out the Lambda Version resource logical name in serverless.yml, which I'm not sure it's possible. Taking a look at their docs, the version logical ID looks like this {normalizedFunctionName}LambdaVersion{sha256}, you could probably ask Serverless maintainers if you can somehow get the sha256 of a function in serverless.yml.
That said, you probably don't need the function version to execute the new code, you can simply invoke $Latest, which should match with the new version when you execute the pre hook.

@davidgf davidgf closed this as completed Jun 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants