Amazon Alexaask-cli

Upgrade Alexa Skill’s Lambda function runtime version from v10.x to v12.0 by using ask-cli v2

Now, ASK CLI(v2) will create a new Lambda Function that the runtime is nodejs10.x. But we can use nodejs12.x o […]

広告ここから
広告ここまで

Now, ASK CLI(v2) will create a new Lambda Function that the runtime is nodejs10.x. But we can use nodejs12.x on AWS lambda.

How to check the runtime version?

The runtime configuration is in ask-resources.json.

% cat ask-resources.json | jq .
{
  "askcliResourcesVersion": "2020-03-31",
  "profiles": {
    "default": {
      "skillMetadata": {
        "src": "./skill-package"
      },
      "code": {
        "default": {
          "src": "./lambda"
        }
      },
      "skillInfrastructure": {
        "userConfig": {
          "runtime": "nodejs10.x",
          "handler": "index.handler",
          "templatePath": "./infrastructure/cfn-deployer/skill-stack.yaml",
          "awsRegion": "us-east-1"
        },
        "type": "@ask-cli/cfn-deployer"
      }
    }
  }
}

// Just pick the runtime
% cat ask-resources.json | jq .profiles.default.skillInfrastructure.userConfig.runtime
"nodejs10.x"

How to upgrade it?

The answer is quite simply, just replace from nodejs10.x to nodejs12.x!

{
  "askcliResourcesVersion": "2020-03-31",
  "profiles": {
    "default": {
      "skillMetadata": {
        "src": "./skill-package"
      },
      "code": {
        "default": {
          "src": "./lambda"
        }
      },
      "skillInfrastructure": {
        "userConfig": {
          "runtime": "nodejs12.x",
          "handler": "index.handler",
          "templatePath": "./infrastructure/cfn-deployer/skill-stack.yaml",
          "awsRegion": "us-east-1"
        },
        "type": "@ask-cli/cfn-deployer"
      }
    }
  }
}

ブックマークや限定記事(予定)など

WP Kyotoサポーター募集中

WordPressやフロントエンドアプリのホスティング、Algolia・AWSなどのサービス利用料を支援する「WP Kyotoサポーター」を募集しています。
月額または年額の有料プランを契約すると、ブックマーク機能などのサポーター限定機能がご利用いただけます。

14日間のトライアルも用意しておりますので、「このサイトよく見るな」という方はぜひご検討ください。

広告ここから
広告ここまで

Related Category posts