alexa-skills-kit

AWS Lambda ARN format for an Alexa Skill


Running my java alexa skill on Lambda. Am experimenting with Lambda provisioned concurrency as the lambda startup time makes my skill respond very slowly. My question pertains to the ARN I set in AWS Lambda ARN -> Endpoint in the alexa developer console.

Lambda gives me multiple options for ARN:

  1. arn:aws:lambda:us-east-1:abc:function:SWBlue without an app version
  2. arn:aws:lambda:us-east-1:abc:function:SWBlue:5 with an app version

When using 1, which app version will be invoked? the latest? Assuming provisioned concurrency is enabled on the latest app version, will that still take effect when using 1?

TIA!


Solution

  • When you invoke a function using an unqualified ARN, Lambda implicitly invokes $LATEST. https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html So 1. should call latest version. You might want to increase memory if your change doesn't help. Java needs to setup Java Virtual Machine (JVM) before it can run for the first time. This is likely why the first interaction is delayed. https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-memory-console