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

Where to set :version or :alias of the lambda function endpoint? #437

Closed
FelixButzbach opened this issue Jul 28, 2022 · 2 comments
Closed

Comments

@FelixButzbach
Copy link

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Performance issue
[x] Feature request
[x] Documentation issue or request 
[ ] Other... Please describe: 

How can I set a specific version or alias for the lambda version as endpoint? I think I found a related issue but I was not able to extract a solution for my problem.

Expected Behavior

I would like to (easily) change the alias of the endpoint of my skill via the ask-cli.
So that I can deploy the new code to the $LATEST version but still be able to set the endpoint to :dev or :prod, for example.
I am not sure if this is a bug, a feature request or if the documentation is just not clear about it...

Current Behavior

When changing the endpoint in the skill-package/skill.json file, it is overwritten when running any of the ask deploy commands (with or without ignoring the hash and any of the --target options).
I also tried to change it in ask-resources.json in the userConfig -> sourceLambda -> arn field which causes an error.

Your Environment and Context

  • ask-cli version: 2.27.0
  • Operating System and version: Mac Monterey (M1 chip)
  • Node.js version used for development: 14.18 locally, 14.x in the lambda function
  • NPM version used for development: 6.14 locally
@FelixButzbach
Copy link
Author

Actually, I think this is not really necessary...
I thought this might be useful to keep track of the different versions of the skill and the endpoints used for production and development.
But as I have just submitted the most recent version of the skill for certification I recognised that I will be better off always defining a new version and alias right before submitting the skill for review and use the naked lambda function (ie. $LATEST) in dev.

Although it might maybe be useful to be able to set a specific endpoint version or alias during development, for investigating bugs in a specific version, for example.
What are the reasons for the current behaviour (overwriting the endpoint when running ask deploy)?

@doiron
Copy link
Contributor

doiron commented Apr 18, 2023

I believe a good approach would be to setup two profiles on your development environment. one for Prod and one for your Dev environment. Then you can append -p [prod|dev] to your command arguments to have them interact with either skill. ie. do all the work on the new feature with -p dev until you think it's ready to launch. then run the commands with -p prod .

useful link : https://developer.amazon.com/en-US/docs/alexa/smapi/manage-credentials-with-ask-cli.html

I hope this helps, feel free to re-open if you still have questions.

@doiron doiron closed this as completed Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants