This skill can be deployed in whatever method you feel most comfortable with. It is packaged in ASK CLI 2.0 format for ease of use if you're comfortable with the CLI. It is also valid to zip the code, deploy manually to Lambda, and then manually configure with skill. Whatever works best. The rest of this section is coving common gotchas with deployment, generally around configuration and permissions.
The most options most likely to need modification are found in the constants.js
file. Pay special attention to PROFILE_API_ENDPOINT as that value is for the endpoint to access user profile information and almost certainly needs changing depending on your Cognito setup.
module.exports = Object.freeze({
// DynamoDB Config
DDB_REGION: "us-east-1",
DEVICE_TABLE_NAME: "asp_sample_devices",
// Cognito Config
PROFILE_API_ENDPOINT: "https://cognito.novaguest.link/oauth2/userInfo",
// Smart Home Config
// FAHRENHEIT or CELSIUS
TEMPERATURE_SCALE: "FAHRENHEIT",
});
Ensure your lambda function has access to DynamoDB. This is a bit permissive so tighten it up as you feel necessary.
Turn on Account linking.
Bring over the following from your Cognito Setup...
- Web Authorization URI
- Access Token URI
- Client ID
- Client Secret
And take the given Alexa Redirect URLs
and add them back to your Cognito Setup.
- Skill Overview
- Initialization and Setup: Cognito and DynamoDB
- Skill Deployment ⇐ (You are here)
- Skill Enablement
- Delegated Account Linking
- Smart Home Features