Software apps and online services
Albert Einstein Facts is a skill that tells a fact about Albert Einstein. There are twenty facts in this skill's database.
To use this skill, enable it and ask the following:
Alexa, Ask Albert Einstein Facts to tell me a fact.
You may get this fact:
Albert Einstein married Mileva Maric in 1903, following the death of his father. They had two sons together, their names were Hans and Eduard. The couple were married for approximately 16 years, they divorced in 1919. During his marriage to Mileva Maric, Albert Einstein had a secret love affair with a woman called Elsa Löwenthal. Albert Einstein married her in 1919 following his divorce to Mileva Maric. His second marriage lasted for approximately 17 years during which time he continued to have affairs with other women. His wife, Elsa Löwenthal, died in 1936.
Setup lambda skill
- Login to the AWS Console and click on the Lambda link. Note: ensure you are in us-east or you won't be able to use Alexa with Lambda.
- Click on the Create a Lambda Function or Get Started Now button.
- Skip the blueprint
- Name the Lambda Function "albertEinsteinFacts".
- Select the runtime as Node.js
index.jsfiles from the respective codes included in the code section below. Remember to change the App Id in index.js.
- Select the above two files and then create a zip file.
- Select Code entry type as "Upload a .ZIP file" and then upload the .zip file to the Lambda
- Keep the Handler as
- Create a
basic execution roleand click create.
- Leave the Advanced settings as the defaults.
- Click "Next" and review the settings then click "Create Function"
- Click the "Event Sources" tab and select "Add event source"
- Set the Event Source type as
Alexa Skills kitand Enable it now. Click Submit.
- Copy the ARN from the top right to be used later in the Alexa Skill Setup
Setup Alexa skill
- Go to the Alexa Consoleand click Add a New Skill.
- Set "Albert Einstein Facts" as the skill name and "albert einstein facts" as the invocation name, this is what is used to activate your skill. For example you would say: "Alexa, ask the Albert Einstein Facts."
- Select the Lambda ARN for the skill Endpoint and paste the ARN copied from above. Click Next.
- Copy the Intent Schema from the Intent Schema include in the code section below.
- Copy the Sample Utterances from the Sample Utterances included in the code section below. Click Next.
- [optional] go back to the skill Information tab and copy the App Id. Paste the App Id into the
index.jsfile for the variable APP_ID, then update the lambda source zip file with this change and upload to lambda again, this step makes sure the lambda function only serves request from authorized source.
- You are now able to start testing your sample skill! You should be able to go to the Echo webpage and see your skill enabled.
- In order to test it, try to say some of the Sample Utterances from the Code section below.
- Your skill is now saved and once you are finished testing you can continue to publish your skill.
Testing and publishing
Follow Testing a Custom Skill.
Visual Interface Diagram
Link to Albert Einstein Facts skill
Click here to check out the skill.