aws re:invent 2016: build a serverless back end for your alexa-based voice interactions(alx302)

59
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Sébastien Stormacq, Solution Architect, Alexa ALX302 12/1/16 Build a Serverless Back End for Your Alexa-Based Voice Interactions

Upload: amazon-web-services

Post on 16-Apr-2017

580 views

Category:

Technology


0 download

TRANSCRIPT

© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Sébastien Stormacq, Solution Architect, Alexa

ALX302

12/1/16

Build a Serverless Back End for Your Alexa-Based Voice Interactions

What to Expect from the Session

• Learn about serverless back end

• Learn about persistence for Alexa Skills

• Learn about tight AWS security to the user invoking your

skill

What to expect from the session

What to Expect from the Session

• Login With Amazon

• AWS Lambda

• Amazon Cognito

• AWS Identity and Access Management

• Amazon DynamoDB

What to expect from the session

If you missed the Alexa Skill Kit…

Areas of improvement

• Infrastructure management

• Identity management

• Persistence

• Fine-grained permissions

Solution architecture

Your Skill Token

NoSQL database

Exchange LWA token for

AWS access key and secret key

Authenticate user

Receives OAuth token

Invoke

w/OAuth token

Identity provider

Use access key and secret key

to read/write items

Improvements to infrastructure

management

Infrastructure management

Your skill code

Infrastructure management

Amazon EC2

Infrastructure management

Infrastructure management

Infrastructure management

AWS Lambda

Amazon DynamoDB

Amazon Cognito

Improvements to managed service:

Lambda and DynamoDB

Managed service benefits

• Lower operational burden

• Lower cost

• Internet scalability

• Designed for very high availability

Improvements to identity management

Identify user across accounts/skills

Unique for { Amazon Account, Enabled Skill }

Identify user across accounts/skills

How to recognize users with multiple Amazon accounts?

How to recognize users after they re-enable the skill?

Improvements to account linking

Linking Alexa Skills with Login with Amazon

Account linking benefits

Stable account across:

• Multiple Amazon accounts

• Multiple skills

• Skills re-enablement

Amazon Cognito benefits

• Stable identity ID

• Distributes AWS credentials

• Limited in time

• Limited in scope

Improvements that enable persistence

User profile persistence

Let Alexa remember user preferences

User profile persistence

Let Alexa remember history

User profile persistence

Let Alexa remember context

Improvements to persistence (without adding

infrastructure)

Built into our ASK SDK for Node.js

http://sebs.to/asksdknodejs

Improvement for fine-grained

control: DynamoDB

DynamoDB benefits

• Entirely managed

• Internet scalability

• Cost effective

Improvement for fine-grained control:

DynamoDB access

Limit Lambda permissions per user

Is there a better way?

Improvement for fine-grained control:

Limit access to DynamoDB

What ?

Where ?

Who ?

AWS IAM roles benefits

• Distinct access policies for Lambda vs. authenticated

users

• Access to user’s DynamoDB items only

Benefits summary

Benefits

• No server-side infrastructure to manage

• Stable Amazon Cognito identity (across devices and

platforms)

• Lambda permissions limited per users

• Internet-style scalability

• Cost effective

Thank you!

@sebsto

Remember to complete

your evaluations!

Thurs

day

11:30am ALX202: How Amazon Is Enabling the Future of Automotive Venetian, Level 3, Lido

3003

1pm ALX303: Building a Smarter Home with Alexa Venetian, Level 3,

Murano 3203

3:30 ALX307: Voice-enabling Your Home and Devices with Amazon Alexa and AWS

IoT

Venetian, Level 2,

Opaline Theatre

5pm ALX302: Build a Serverless Back End for Your Alexa-Based Voice Interactions Venetian, Level 2,

Opaline Theatre

9:30am ALX304: Tips and Tricks on Bringing Alexa to Your Products Venetian, Level 1, Marco

Polo 806

11am ALX305: From VUI to QA: Building a Voice-Based Adventure Game for Alexa Venetian, Level 1, Marco

Polo 806Friday

11am ALX203: Workshop: Creating Voice Experiences with Alexa Skills: From Idea to

Testing in Two Hours

Mirage, Jamaica B

1pm ALX306: State of the Union: Amazon Alexa and Recent Advances in

Conversational AI

Venetian, Level 2, Sands

Showroom

11:30am

and 2:30pm

ALX204: Workshop: Build an Alexa-Enabled Product with Raspberry Pi Mirage, Antigua B

5pm ALX301: Alexa in the Enterprise: How JPL Leverages Alexa to Further Space

Exploration with Internet of Things

Venetian, Level 2,

Venetian B

Wednesday