Index

Symbols

> character 112

A

access permissions 106

ACL (access control list) 106

addButton method 132

addImage method 132

addQuickReplyLocation method 153

afterEach function 203

AI (artificial intelligence) 162

Alexa

overview of 175185

skills

anatomy of 177179

coding 182186

preparing 179

Alexa, skill

setting up 305310

AlexaMessageBuilder 182, 183, 184

Alexa Skills Kit 180

ALICE (Artificial Linguistic Internet Computer Entity) 124

AmazonAPIGatewayAdministrator 285

AmazonAPIGatewayPushToCloudWatchLogs 286

AmazonDynamoDBFullAccess 285

Amazon Echo 176

Amazon S3 114115

ANY method 239

api.delete method 37, 39

api.get function 28

api.put method 37

API Gateway 3536

api-module option 23, 126

ApiResponse method 101

APIs (application program interfaces)

connecting to 6471

controlling access with Cognito 97100

structuring 2529

testing 5155

app.listen function 237

apps 81, 104, 193, 248, 252

Express.js

migrating to AWS Lambda 236

running in AWS Lambda 236240

for Facebook 291293

Array.find method 141

Array.join function 128

artificial intelligence (AI) 162

Artificial Linguistic Internet Computer Entity (ALICE) 124

async communication, potential issues with 7176

forgetting to return promises 72

not passing values from promises 73

not wrapping external services in promises 7374

timeout issues with long async operations 7476

asynchronous operations

promises 4850

rejection 49

retrieving orders from database 5556

storing orders 4348

testing APIs 5155

timeout issues with 7476

ata-amount attribute 229

attach-role-policy command 87

authentication, serverless 9194

Authorization header 68

authorizer function, Lambda 94

automated testing 191, 192, 211212

AWS_PROFILE variable 284

AWS (Amazon Web Services)

creating profiles 285287

installing CLI 288

AWS CloudFormation 259

AWS Cognito 97100

aws cognito-identity create-identity-pool command 95

aws cognito-identity set-identity-pool-roles command 96

aws cognito-idp create-user-pool-client command 95

aws cognito-idp create-user-pool command 94

aws dynamodb create-table command 44

aws iam put-role-policy command 152

AWS Lambda 85

migrating Express.js apps to 236

connecting to MongoDB 243248

serving static content 240242

running Express.js applications in 236240

proxy integration 239

serverless-express 239240

AWSLambdaFullAccess 285

aws logs filter-log-events command 88

aws-sdk module 148

awsServerlessExpress.createServer function 238

awsServerlessExpress.proxy function 238

aws-serverless-express module 237, 238, 238

AWSXRay.captureAWS command 88

aws-xray-sdk-core module 87

AWS X-Ray tool 8588

Azure Functions 11

B

BaaS (Backend as a Service) 6

Babel 272

backslashes 23, 293

beforeAll function 208

beforeEach function 203

body-parser module 243, 244

Bot Builder 125, 126,

botBuilder.fbTemplate.Generic class 132

botBuilder function 128, 130, 131, 135, 140, 159

Braintree 222

bucket flag 115

buckets 105

Bugsnag 265

business logic risks 213

Button class 142

button template 131

C

cache-api-config option 130

cachedDb.serverConfig.isConnected() function 244

callbackWaitsForEmptyEventLoop property 248

callOptions function 205

case studies

CodePen 270274

before serverless architecture 270271

challenges 274

cost of infrastructure 273274

migration to serverless architecture 271273

MindMup 275281

before serverless architecture 275277

challenges 280281

cost of infrastructure 279280

logs 280281

migration to serverless architecture 277279

testing 280281

chatbots 123, 130131

Claudia Bot Builder 134135

connecting to DynamoDB database 148153

creating for Facebook Messenger 293299

deploying 130131

getting user location from 153155

in Facebook Messenger 124127131, 133

in SMS 169170

integrating NLP libraries 161163

interactivity 139144

making structure more scalable 145148

scheduling deliveries 156161

child_process module 111

claudia allow-alexa-skill-trigger command 186

Claudia API Builder 288

claudia-api-builder module 22

Claudia Bot Builder

creating Facebook Messenger chatbots with 293299

installing 288

overview of 134135

claudia create command 23, 24, 34

claudia generate-serverless-express-proxy command 237

Claudia library

configuring prerequisites 284

installing 283288

Claudia API Builder 288

Claudia Bot Builder 288

creating AWS profiles 285287

overview of 1517

claudia update command 28, 35, 40, 51, 70, 170

claudia update --configure-twilio-sms-bot command 168

claudia update function 55

CLI (command line interface) 288

CloudWatch 82

CodeBuild 259

CodeDeploy 259

CodePen 270274

before serverless architecture 270271

challenges 274

additional scaling 274

cold starts 274

monitoring 274

security 274

cost of infrastructure 273274

migration to serverless architecture 271273

CodePipeline 259

Cognito 97100

cognitoAuthorizer key 97

cognito-identity-providers flag 95

cold starts 14, 265266

collection.deleteOne function 249

Command pattern 273

competence of security 232

config flag 28

configuration risks 213

configure-fb-bot option 126, 294

configure function 204

configuring

Alexa 305310

Claudia prerequisites 284

Facebook Messenger 289300

creating Facebook apps 290292

creating Facebook Messenger chatbots using Claudia Bot Builder 292299

creating Facebook pages 290

enabling built-in NLP 300

MongoDB 315320

configuring clusters 315320

creating account 313

Stripe 311313

Twilio 300304

creating Twilio accounts 301302

getting Twilio numbers 303

setting up Twilio Programmable SMS service 303305

connectToDatabase function 246

continuous integration 258259

convert function 110, 110, 111, 111

coordinates as parameter 154

createCharge method 227

createOrder function 30, 64

curl tool 32, 33

custom authorizers 94, 97

custom errors, returning 101

custom slot type 180

D

data-currency attribute 229

data-description attribute 229

data-image attribute 229

data-key attribute 229

data-locale attribute 229

data-name attribute 229

data-zip-code attribute 229

DCE (Distributed Computing Environment) 54

DDoS (distributed denial of service) attacks 264, 266

DDoW (distributed denial of wallet) attacks 266

debugging

AWS X-Ray tool 8588

Lambda functions 8285

serverless apps 8182

DELETE method 37, 76

deleteOrder function 38, 77

deleteTable method 208

deliveryWebhook function 160, 161

deploying

Amazon S3 functions 114115

APIs 3435

describe-log-groups command 83

DialogFlow 161

Dialogue Builder 148

Distributed Computing Environment (DCE) 54

distributed denial of service (DDoS) attacks 264, 266

distributed denial of wallet (DDoW) attacks 266

docClient.put method 148

DocumentClient.scan method 154

DocumentClient.update method 154

DocumentClient class 46, 46, 55, 148, 203

done.fail() method 206

done() method 206

DynamoDB class 43, 44, 44, 208

DynamoDB database 148153

E

E2E (end-to-end) tests 192

elastic network interfaces (ENIs) 262

endpoints 65

end-to-end (E2E) tests 192

ENIs (elastic network interfaces) 262

environments

development of 259260

production of 259260

error recovery 49

errors, returning 101

event emitters 6

event listeners 6

events 6

exec method 112

expectations 198

expect statements 198

exporters, MindMup 275

Express.js

migrating apps to AWS Lambda 236

connecting to MongoDB 243248

serving static content 240242

running applications in AWS Lambda 236240

proxy integration 239

serverless-express 239240

serverless apps

limitations of 248249

managed MongoDB database with 243248

ExpressionAttributeValues 59

express-module option 237

external services

connecting to 63

async communication, potential issues with 7176

connecting to delivery APIs 6471

wrapping in promises 7374

F

FaaS (Function as a Service) 6, 263

Facebook Messenger

chatbots 124127

configuring 289300

creating Facebook apps 290292

creating Facebook Messenger chatbots using Claudia Bot Builder 292299

creating Facebook pages 290

enabling built-in NLP 300

templates 131133

fakeHttpRequest.install function 208

fake-http-request library 203, 206

Fanout pattern 254

fbTemplate.Generic class 132

fbTemplate.Text class 153

fbTemplate constant 133

federated identities 92

FileRepository 280

files, static

serving 256

storing in serverless applications 104108

files, storing 105

filter variable 196

fs.writeFile command 112

fs module 111

fulfilled promises 48

Function as a Service (FaaS) 6, 263

functions 82, 254, 263

Amazon S3, deploying 114115

bundled vs single-purpose 263

serverless

mocking 201

writing testable 212216

G

generic templates 131

getAllCharges method 233

get method 55

getObject method 111

GET requests 2225

getSignedUrl method 106, 107, 107

globally unique identifier (GUID) 54

Google Cloud Functions 11

GUI (graphical user interface) 32

GUID (globally unique identifier) 54

H

hacking payment services 231232

security competence 232

security standards 231232

handler flag 114

handler method 13

hash key 44

headless browsers 212

Hexagonal Architecture 214, 225

HoneyBadger 274

https.request.pipe method 205

I

IAM (Identity and Access Management) 35, 262

iam attach-role-policy command 86

IAMFullAccess 285

IBM Watson 162

identity pools 92, 9496, 100

ImageMagick 109

images, converting to thumbnails 113

infrastructure layer, vendor lock-in 267

installing

AWS CLI 288

Claudia 283288

configuring Claudia prerequisites 284285

creating AWS profiles 285287

Claudia API Builder 288

Claudia Bot Builder 288

MongoDB 313320

Stripe 311313

integration

continuous 258259

proxy integration 239

risks 214

testing 207211

IntentRequest 183

intents 176

intent schema 180

interactivity of chatbots 139144

iopipe function 257

IoT (Internet of Things) events 6

J

Jasmine framework 194

jasmine-spec-reporter package 196

Jenkins tool 259

JWT (JSON Web Token ) 274

K

keepSession method 184

L

Lambda functions

choosing memory size for 263264

debugging 8285

lambda update-function-configuration command 87

launch phrases, Alexa 177

LaunchRequest 183

listCharges method 232

list template 131

loadConfigFile method 196

locations of chatbot users 153155

logs 257258

logs filter-log-events command 83

M

MemoryRepository 280

message.addButton method 132

message.get method 132

message attribute 140

message parameter 136, 143

Microsoft Azure Functions 11

migrating

existing applications to serverless architecture 252254

Express.js app to AWS Lambda 236

connecting to MongoDB 243248

running Express.js applications in 236240

serving static content 240242

to serverless architecture

analyzing serverless applications 252

challenges of 264268

continuous integration 258259

existing applications 252254

logs 257258

managing environments 259260

optimizing applications 263264

serving static files 256

sharing secrets 260262

storing state 256257

VPC (Virtual Private Cloud) 262

mind maps 275

MindMup 275281

before serverless architecture 275277

challenges 280281

cost of infrastructure 279280

logs 280281

migration to serverless architecture 277279

testing 280281

minimal-request-promise module 67, 77

MMS (Multimedia Messaging Service) 169

mocking serverless functions 201

MongoClient.connect function 244

MONGODB_CONNECTION_STRING variable 247

MongoDB database

configuring 313320

configuring clusters 315320

creating account 313

connecting to 243248

installing 313320

with serverless Express.js apps 243248

mongodb module 243

monolithic application 8

Multimedia Messaging Service (MMS) 169

N

NAT (network address translation) 262

new mongodb.ObjectID function 249

NLP (natural language processing) 124, 138, 139, 177

nlp key 163

NLP libraries

built-in, enabling 300

integrating 161163

node app.js command 237

no-optional-dependencies flag 116

npm install --production command 34

npm install -S stripe command 225

npm run update command 133, 155

npm test command 197

O

orderId attribute 44

orderRepository.updateOrderStatus method 227

originalRequest property 135

OSF (Open Software Foundation) 54

output attribute 45

P

PaaS (Platform as a Service) 4, 275

parallel execution, promises 49

path module 111

paymentRepository.createCharge function 227

paymentRepository.getAllCharges method 233

payments

online, implementing 221224

transactions 220224

payment services

hacking 231232

security competence 232

security standards 231232

implementing 225231

PCI DSS compliance 231232

PCI SSC (Payment Card Industry Security Standards Council) 231

permissions 35, 91

pipe character 141, 143

pipe method 204

Platform as a Service (PaaS) 4, 275

platforms key 130

ports and adapters pattern 214

postback property 135

postbacks 139144

Postman application 32

POST requests 3033, 205

prefix flag 115

presigned URL generation 107

pricing 14

production flag 259

production of environments 259260

promises 4850

passing values from 73

returning 72

wrapping external services in 7374

proxy integration 239

proxy router 36

put function 204

putObject method 106

put-role-policy command 52

PUT route 37

query attribute 45

query flag 95

R

RDS (Relational Database Service) 63

receipt template 131

region flag 23, 105

registerAuthorizer method 97

rejected promises 48

Relational Database Service (RDS) 63

reply function 159

request.body attribute 31

request routing 36

Request URL text field 304

resize flag 112

resolved promises 48

return keyword 72

ReturnValues 59

reverse echo chatbot 136

role attribute 52

roles 35, 94

routers 36, 272

runner 195

S

S3_BUCKET variable 261

SAM (Serverless Application Model) 16

saveLocation function 155, 155

scalability of chatbot structure 145148

scan method 53, 5556

secrets 260262

security

competence 232

standards 231232

Semaphore CI 259

sender property 135

server.listen function 236

server-hosted applications 191

serverless APIs

API Gateway 3536

building 1933

GET requests 2225

POST requests 3033

structuring APIs 2530

deploying 3435

pitfalls of 36

Serverless Application Model (SAM) 16

serverless apps

analyzing 252

debugging 8182

Express.js

limitations of 248249

managed MongoDB database with 243248

storing static files in 104108

testing 191193

serverless architecture

AWS 1115

benefits of 18

continuous integration 258259

core concepts 56

environments

development of 259260

production of 259260

logs 257258

migrating to

analyzing serverless applications 252

challenges of 264268

optimizing applications 263264

overview of 6

serving static files 256

sharing secrets 260262

storing state 256257

VPC (Virtual Private Cloud) 262

serverless-express 239240

serverless-express module 239, 239

serverless function 5, 6

serverless testing pyramid 193

service layer

automated tests 192

vendor lock-in 267

SessionEndedRequest 183

sessions, Alexa 179

setTimeout 74, 75

shared-nothing architecture 256, 256

Simple Notification Service (SNS) 254

Simple Queue Service (SQS) 63

Simple Storage Service (S3) 63, 254

skills, Alexa

anatomy of 177179

coding 182186

preparing 179

slots 176, 177

slot types, built-in 180

SMS (short message service) 166

chatbots 169170

sending with Twilio 167

setting up Twilio Programmable SMS service 303304

SNS (Simple Notification Service) 254

social identity providers 92

spawn method 112

SpecReporter library 196

specs 195

SQS (Simple Queue Service) 63

standards

for security 231232

PCI DSS compliance 231232

states, storing 256257

static content 240243

static files

serving 256

storing in serverless applications 104108

stderr stream 112

stdout stream 112

storing

orders 4348

states 256257

static files in serverless applications 104108

String.split function 142

stripe.charges.create method 227, 228

stripe.charges.list method 234

Stripe payment processing

API keys

configuring

creating accounts

installing

success attribute 31

suites 195

switch statements 148

T

TABLE_NAME variable 260

tableExists status 209

tableNotExists status 210

technical workflow risks 213

testing

APIs 5155

automated testing 211212

integration tests 207211

mocking serverless functions 201

preparing for 194197

server-hosted applications 191

serverless applications 191193

unit tests 197201

writing testable serverless functions 212216

testing framework, Jasmine 194

testing pyramid 192

text property 135

third-party logging 258

three-tier architecture 7

throttling 266

thumbnails 108115

timeout issues

handling 264265

with asynchronous operations 7476

timeout option 75

Travis CI 259

Twilio platform

creating accounts 301302

getting numbers 303

sending SMS with 167

setting up 300304

setting up Twilio Programmable SMS service 303304

twilio-sms-chatbot command 171

type property 135

U

UI layer, automated tests 192

unfulfilled promises 48

unit layer, automated tests 192

unit tests 197201

universally unique identifier 54

update command 130

UpdateExpression 58, 59

updateOrder function 37, 38

URL generation 107

userAuthentication 107

userData argument 100, 102

user identity 91

userId parameter 154

username-attributes option 94

user pools 92, 9495, 100

utterances 177, 180

uuid module 150

V

values, not passing from promise 73

vendor lock-ins 267268

VM (virtual machine ) 256

VPC (Virtual Private Cloud) 262

W

waitFor method 208

wake word, Alexa 176

warm starts 265

watchdog timer 264

webhookURL 68

Wit.ai library 161

wrapping external services 7374

Y

YOUR_ACCESS_KEY value 284

YOUR_ACCESS_SECRET value 284

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset