appleboy / lambda-action

GitHub Action for Deploying Lambda code to an existing function

Home Page:https://github.com/marketplace/actions/aws-lambda-deploy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for versioning / aliases

mikeparker opened this issue · comments

We would like to push a new lambda then update the alias to point at the new version.
For example, if we have PROD and TEST, we might want to deploy to TEST but not PROD.
Then another action trigger we may want to deploy to PROD.

If we don't want to build in support for this in this action, could we return the version we just uploaded so we can use the aws cli to update aliases in a later step?

Thanks!

I'd like to piggyback on this request by utilizing the package.json verison attribute so that there's more consistency between deployed/active versions, and the version dropdown for the Lambda can reflect the same Node.js package version number.

@mikeparker

  • Function name - my-function (name-only), my-function:v1 (with alias).

See: https://docs.aws.amazon.com/sdk-for-go/api/service/lambda/#UpdateFunctionCodeInput

Hey I am trying to also do a similar thing. I want to create two separate yml files for releases and pushes to dev. For the dev, I want to deploy to the Dev stage. When I tried something like this:

58 function_name: lee-api:DEV

It says that the only supported stage right now is $LATEST.

I am having the same issue. This is my error message when I try to update a specific version:
InvalidParameterValueException InvalidParameterValueException: Current operation does not support versions other than $LATEST

You can set up the reversion_id.

Only update the function if the revision ID matches the ID that's specified.
Use this option to avoid modifying a function that has changed since you
last read it.

It is not obvious what you mean in your closing statement, it the reversion_id the version in Lambda or something else?