alexa / ask-cli

Alexa Skills Kit Command Line Interface

Home Page:https://developer.amazon.com/en-US/docs/alexa/smapi/ask-cli-intro.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ask cli 'new' uses wrong runtime version of python

jallwork opened this issue · comments

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
commented

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

please re-open if this persists.