Closed nishantcasey closed 1 year ago
Hi mate, I was trying to run the template and was having the same issue - can you share the steps you followed to set up the stack in nodejs14.x? It'd be a great help as I'm still getting into this space. Cheers
Did you use the template below and how did you deploy it?
AWSTemplateFormatVersion: '2010-09-09' Metadata: Name: alexa-skills-kit-nodejs-factskill Transform: AWS::Serverless-2016-10-31 Resources: alexaskillskitnodejsfactskill: Type: AWS::Serverless::Function Properties: Handler: index.handler Description: Demonstrate a basic fact skill built with the ASK NodeJS SDK Timeout: 7 CodeUri: Bucket: <%REPO_BUCKET%> Key: 99fe9bf4-738d-40d5-9e0b-9bffaec8b930 Runtime: nodejs10.x MemorySize: 128 Events: AlexaTrigger: Type: AlexaSkill Description: Demonstrate a basic fact skill built with the ASK NodeJS SDK
Hi mate, I was trying to run the template and was having the same issue - can you share the steps you followed to set up the stack in nodejs14.x? It'd be a great help as I'm still getting into this space. Cheers
Did you use the template below and how did you deploy it?
The steps were as follows:
Metadata:
Name: alexa-skills-kit-nodejs-factskill
Transform: AWS::Serverless-2016-10-31
Resources:
alexaskillskitnodejsfactskill:
Type: AWS::Serverless::Function
Properties:
Handler: index.handler
Description: Demonstrate a basic fact skill built with the ASK NodeJS SDK
Timeout: 7
CodeUri:
Bucket: <<< Replace this with the bucket from your failed stack deployment >>>
Key: <<< Replace this with the key from your failed stack deployment >>>
Runtime: nodejs14.x
MemorySize: 128
Events:
AlexaTrigger:
Type: AlexaSkill
Description: Demonstrate a basic fact skill built with the ASK NodeJS SDK
Looking at your key, it seems you are missing the full arn.. It should be [your-account-id]/arn:aws:serverlessrepo:us-[your-region]:[your-account-id]:applications-AlexaSkillsNode14-versions-1.0.0/[your-uuid]
Hope that works for you too!
Coming from a 2018 tutorial, the above solution worked!
We have updated the serverless app. You should be able to deploy it.
When attempting to deploy this using Lambda Application based SAM deploy, the CloudFormation stack errors out with the following error:
"The runtime parameter of nodejs10.x is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (nodejs14.x) while creating or updating functions."
Workaround
The deployment worked & I was able to test the function with the 'Alexa Start Session' test event.
Can the application please be updated at the SAM side to modify the template in this way?