dpl icon indicating copy to clipboard operation
dpl copied to clipboard

[Deploy Lambda] Aliases

Open DaMaillard opened this issue 8 years ago • 11 comments

Could you add the possibility, in deploying a lambda, of handling aliases ? (cf http://docs.aws.amazon.com/lambda/latest/dg/aliases-intro.html )

It's missing for the moment (or may be I missed it ?) and would be very useful !

DaMaillard avatar Feb 06 '17 17:02 DaMaillard

Aliasing lambdas is a super great feature that I've been utilizing to keep separation of "development" lambdas & "production" lambdas.

I've been working around the lack of alias arguments by using my own script deployment.

MaxwellGBrown avatar Nov 01 '17 15:11 MaxwellGBrown

ETA?

carlthome avatar Dec 13 '17 08:12 carlthome

Would love this too.

In the meantime here's my workaround, for setting a specific alias to the version just deployed (you'll need to set LAMBDA_NAME and LAMBDA_ALIAS accordingly, and this also assumes your AWS config is already available via AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_DEFAULT_REGION):

after_deploy:

  # Set a Lambda alias to the most recently deployed version.
  - pip install awscli --upgrade --user
  - export MOST_RECENT=$(aws lambda list-versions-by-function --function "${LAMBDA_NAME}" --max-items 10000 | node -e "let stdin=''; process.stdin.on('data',(chunk)=>{stdin+=chunk}).on('end',()=>{console.log(JSON.parse(stdin).Versions.pop().Version)})")
  - aws lambda update-alias --function-name "${LAMBDA_NAME}" --name "${LAMBDA_ALIAS}" --function-version "${MOST_RECENT}"

tdmalone avatar Jan 26 '18 03:01 tdmalone

Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please do feel free to either reopen this issue or open a new one. We'll gladly take a look again! You can read more here: https://blog.travis-ci.com/2018-03-09-closing-old-issues

stale[bot] avatar Apr 26 '18 03:04 stale[bot]

unstale

tdmalone avatar Apr 26 '18 05:04 tdmalone

Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please do feel free to either reopen this issue or open a new one. We'll gladly take a look again! You can read more here: https://blog.travis-ci.com/2018-03-09-closing-old-issues

stale[bot] avatar Jul 25 '18 06:07 stale[bot]

unstaleeeee

tdmalone avatar Jul 25 '18 11:07 tdmalone

Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please do feel free to either reopen this issue or open a new one. We'll gladly take a look again! You can read more here: https://blog.travis-ci.com/2018-03-09-closing-old-issues

stale[bot] avatar Dec 29 '18 19:12 stale[bot]

unstale

tdmalone avatar Dec 30 '18 06:12 tdmalone

@stale Hello?

tdmalone avatar Jan 01 '19 01:01 tdmalone

@DaMaillard @MaxwellGBrown @carlthome @tdmalone I'd like to take a shot at this in dpl v2. however, i could use some guidance on how exactly this feature needs to work. could you elaborate on when the alias/es would need to be created and/or updated with what details?

svenfuchs avatar Aug 19 '19 13:08 svenfuchs