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

ask cli 'new' uses wrong runtime version of python #447

Closed
jallwork opened this issue Mar 8, 2023 · 1 comment
Closed

ask cli 'new' uses wrong runtime version of python #447

jallwork opened this issue Mar 8, 2023 · 1 comment
Assignees

Comments

@jallwork
Copy link

jallwork commented Mar 8, 2023

I'm submitting a...


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

The command 'ask new' > python > AWS Lambda skill, creates a skill using python 3.6, not python 3.9.
'ask deploy' then reports an error:
The runtime parameter of python3.6 is no longer supported

Expected Behaviour

Python 3.9 should be created in ask-resources.json
{
"askcliResourcesVersion": "2020-03-31",
"profiles": {
"skillInfrastructure": {
"userConfig": {
"runtime": "python3.9",

Current Behavior

runtime python 3.6 is used in ask-resources.json
{
"askcliResourcesVersion": "2020-03-31",
"profiles": {
"skillInfrastructure": {
"userConfig": {
"runtime": "python3.6",

Steps to Reproduce (for bugs)

Create a new Python AWS Lambda skill using 'ask new' , then use 'ask deploy':

PS C:\users\john\Documents\alexa> ask new
Please follow the wizard to start your Alexa skill project ->
? Choose the programming language you will use to code your skill: Python
Host your skill code on AWS Lambda (requires AWS account).
? Choose a template to start with: Hello world
? Please type in your folder name for the skill project (alphanumeric): helloworld
Project for skill "helloworld" is successfully created at C:\users\john\Documents\alexa\helloworld

Project initialized with deploy delegate "@ask-cli/lambda-deployer" successfully.
PS C:\users\john\Documents\alexa> cd .\helloworld
PS C:\users\john\Documents\alexa\helloworld> ask deploy
Deploy configuration loaded from ask-resources.json
Deploy project for profile [default]

==================== Deploy Skill Metadata ====================
Skill package deployed successfully.
Skill ID: amzn1.ask.skill.c5ff763f-baf6-4a98-a206-55..

==================== Build Skill Code ====================
.. messages

Skill code built successfully.
Code for region default built to C:\users\john\Documents\alexa\helloworld.ask\lambda\build.zip successfully with build flow PythonPipBuildFlow.

==================== Deploy Skill Infrastructure ====================

× Deploy Alexa skill infrastructure for region "default"
→ The lambda deploy failed for Alexa region "default": InvalidParameterValueException: The runtime parameter of pyth
o…
[Error]: CliError: The lambda deploy failed for Alexa region "default": InvalidParameterValueException: The runtime parameter of python3.6 is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (python3.9) while creating or updating functions.

Possible Solution / workaround

ASK CLI new should create correct json

User must edit ask-resources.json
to use Python3.9

Your Environment and Context

  • ask-cli version: 2.28.0
  • Operating System and version: Windows 10
  • Node.js version used for development: v19.3.0
  • NPM version used for development: 9.6.0
@doiron
Copy link
Contributor

doiron commented Mar 28, 2023

thanks for reporting, fixed the templates to use Python 3.9.

please re-open if this persists.

@doiron doiron closed this as completed Mar 28, 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

3 participants