This construct creates a CodePipeline to deploy Alexa Skills to Lambda and to the Developer console using AWS SAM and the DeployToAlexa action of CodePipeline.
You need to create secrets in SecretManager containing access to the Alexa Developer Console and optionally to GitHub when your code resides there.
First of all, generate a client and a token using the official documentation: https://developer.amazon.com/docs/smapi/ask-cli-command-reference.html#generate-lwa-tokens
The create a Secret with the fields: ClientId
, ClientSecret
and RefreshToken
Create a personal access token and store it in a secret with one Key/Value pair named Token
...
The library provides a class called AlexaSkillPipelineStack
which can be added to your CDK app.
import { App } from '@aws-cdk/cdk';
import { AlexaSkillPipelineStack } from 'taimos-cdk-constructs';
const app = new App();
new AlexaSkillPipelineStack(app, {
skillName: 'my-skill',
githubOwner: 'taimos',
githubRepo: 'my-skill',
skillId: 'amzn1.ask.skill.????????-????-????-????-????????????',
});
app.run();
The following options can be specified:
skillId
- Skill Id in the develoepr console (mandatory)skillName
- Skill name without spaces or special characters (mandatory)branch
- The branch to deploy (Defaultmaster
)githubOwner
- The owner of the GitHub projectgithubRepo
- The repo name in GitHubgithubSecretId
- The name of the SecretsManager secret containing the GitHub token (Default:GitHub
)AlexaSecretId
- The name of the SecretsManager secret containing the Developer console token (Default:Alexa
)
If you do not specify GitHub owner and repo, the stack will create a CodeCommit repository instead of deploying from GitHub.