The CDK Construct Library for Alexa::ASK
Project description
Alexa Ask Construct Library
const alexaAsk = require('@aws-cdk/alexa-ask');
Alexa as deploy target for CodePipeline
You can deploy to Alexa using CodePipeline with the following DeployAction.
// Read the secrets from ParameterStore
const clientId = new cdk.SecretParameter(this, 'AlexaClientId', { ssmParameter: '/Alexa/ClientId' });
const clientSecret = new cdk.SecretParameter(this, 'AlexaClientSecret', { ssmParameter: '/Alexa/ClientSecret' });
const refreshToken = new cdk.SecretParameter(this, 'AlexaRefreshToken', { ssmParameter: '/Alexa/RefreshToken' });
// Add deploy action
new alexaAsk.AlexaSkillDeployAction({
actionName: 'DeploySkill',
runOrder: 1,
inputArtifact: sourceAction.outputArtifact,
clientId: clientId.value,
clientSecret: clientSecret.value,
refreshToken: refreshToken.value,
skillId: 'amzn1.ask.skill.12345678-1234-1234-1234-123456789012',
});
If you need manifest overrides you can specify them as parameterOverridesArtifact
in the action:
const cloudformation = require('@aws-cdk/aws-cloudformation');
// Deploy some CFN change set and store output
const executeChangeSetAction = new cloudformation.PipelineExecuteChangeSetAction({
actionName: 'ExecuteChangesTest',
runOrder: 2,
stackName,
changeSetName,
outputFileName: 'overrides.json',
outputArtifactName: 'CloudFormation',
});
// Provide CFN output as manifest overrides
new alexaAsk.AlexaSkillDeployAction({
actionName: 'DeploySkill',
runOrder: 1,
inputArtifact: sourceAction.outputArtifact,
parameterOverridesArtifact: executeChangeSetAction.outputArtifact,
clientId: clientId.value,
clientSecret: clientSecret.value,
refreshToken: refreshToken.value,
skillId: 'amzn1.ask.skill.12345678-1234-1234-1234-123456789012',
});
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aws-cdk.alexa-ask-0.27.0.tar.gz
(23.6 kB
view hashes)
Built Distribution
Close
Hashes for aws_cdk.alexa_ask-0.27.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9052682e84093edd47ca6dbd345aa0817112b88502690b857ce7b7eb8e646bd |
|
MD5 | 5cc0e45d3c94349b0663951ce728a14d |
|
BLAKE2b-256 | be8f3126c36446e3bcea7cecf5c30fa56d7093e59b59650a98c89437bde631cb |