I can confirm this is the only workaround to get a skill in development shared across different accounts.
You can deploy the skill on your other users’ Amazon account while still pointing to the same AWS resources and therefore cloud connector instance. To that effect, when these users enable the skill on their account they can log in with their own account on your cloud connector during the account linking process.
To do so, you would need to setup additional profiles with ASK CLI. For each profile, authorize the relevant Amazon account and no need to specify AWS credentials since you wouldn’t deploy the skill infrastructure from these profiles.
To configure each new profile, I would recommend using the --no-browser
parameter and send the generated authorization url to the relevant users who can just send back the authorization code after they log in into their Amazon account.
ask configure --no-browser -p <profileName>
To deploy, you will need to have already run the deploy command as per the installation instructions with your default profile. This should have added your Lambda endpoint to skill-package/skill.json
.
At that point, you can just deploy the skill metadata on each of the profile you created by running the following command:
ask deploy -t skill-metadata -p <profileName>
Also, make sure to update the skill account linking information using the newly created skill id displayed in the step above.
ask smapi update-account-linking-info -s <skillId> --account-linking-request file:accountLinking.json
Last step is to add permission to your Lambda function to allow each newly created skill to invoke it. You can run the following command using the AWS CLI:
aws lambda add-permission --statement-id AlexaSkillFunctionPermission<profileName> --function-name alexa-openhab --action lambda:invokeFunction --principal alexa-connectedhome.amazon.com --event-source-token <skillId>
Or if you prefer, use the AWS console to add the permission to the relevant Lambda function.