Serverless Programming Cookbook - Errata

In spite of the effort from the author and the reviewers, there will be still some errors that is not noticed until the book is published. I will capture all those mistakes I found out myself and those that are reported by my users here.

Chapter 1

  1. Amazon CloudWatch is mentioned instead of Amazon CloudFormation in recipe 6 “Dev Practices – dependency injection and unit testing”, under the heading 'Code refactoring' after 'Getting ready' and before 'How to do it'. Will be corrected in next update.

Chapter 2

In recipe 3 (Building your First API With Lamda Integration),dev is mentioned instead of dev1

aws lambda add-permission \

--function-name lambda-for-api-gateway \

--statement-id apigateway-st-1 \

--action lambda:InvokeFunction \

--principal apigateway.amazonaws.com \

--source-arn "arn:aws:execute-api:us-east-1:<account_id>:tyu4dw36th/dev1/GET/lambdagreeting/{name}" \

--profile admin

https://tyu4dw36th.execute-api.us-east-1.amazonaws.com/dev1/lambdagreeting/Heartin

Chapter 4

In recipe 5 (Working With Groups), Screenshot is wrong for the first step 'Create a group called administrators, '. It should be like below screenshot

Chapter 5

In 'How to do it' section of first recipe 'Setting up an S3 static website', there is a line 'We are also using the aws cli s3api command, instead of the aws cli s3 command that we were using hitherto'. Here  hitherto needs to be replced with before.

In the same reicpe, for the below code error.html ,ending body tag should be </body>

<body>
<h1> Error page for Q & A Time! </h1>
<body>

Also in the below code, bucket name should be qnatime not qnatime.com

ws s3api put-bucket-website \
 --bucket qnatime.com \
 --website-configuration file://resources/s3-website-configuration.json \
 --profile admin

In the recipe 'Setting up CloudFront for an s3 website'(recipe 2),  in the cloudformation template code, domain name in the yml should be 'qnatime.s3.amazonaws.com'. It needs to be changed in the book as well as in the commited code

Resources:
  MyCloudFrontDistribution:
    Type: AWS::CloudFront::Distribution
Properties:
      DistributionConfig:
        Origins:
- DomainName: quizzer.cloud.s3.amazonaws.com

Also for the same recipe 2, output using the cloudformation template should be the screenshot of hitting the url 'http://d130e9lj3phwkc.cloudfront.net/'. In screenshot, url is different from the one from screenshot obtained in last step

Chapter 6

  1. In recipe 7 (Invoking a Lambda with SNS events (Java)), add the 'You should have already created the SNS topic and subscriptions as discussed in the Your first SNS topic for email and SMS recipe.' Also, Created the SQS queue and send messages by following the recipe Your first SQS queue (AWS CLI + CloudFormation). in the getting ready section
  2. In recipe 2, Creating an SQS queue and sending messages with SDK , policy document with SQS permission , missed quotation marks in the json

{

   "Version":"2012-10-17",

   "Statement":[

      {

         "Effect":"Allow",

         "Action":[

            "sqs:CreateQueue",

            "sqs:GetQueueUrl",

            "sqs:SendMessage"

         ],

         "Resource":[

            "arn:aws:sqs:*:*:*"

         ]

      }

   ]

}

Chapter 7

  1. Redshift is mentioned instead of Kinesis in the chapter heading (both within the chapter and within the table of contents). However, all the recipes have correct headings. Redshift was original plan but changed to Kinesis based on relavence to serverless. Will be corrected in next update.
  2. In Recipe 4(Using Amazon ML for binary classification (AWS CLI)), above below code add the message that , while running below code, you will get the error which is due to change in ams . An error occurred (AccessDeniedException) when calling the CreateDataSourceFromS3 operation: Thank you for your interest in Amazon Machine Learning. AmazonML is no longer available to new customers.  Please consider using Amazon SageMaker.

aws machinelearning create-data-source-from-s3 \  
--cli-input-json file://create-data-source-from-s3-cli-input.json \  
--region us-east-1 \  
--profile admin

Chapter 9

  1. In Recipe 2(Implementing and testing Cognito operations with the JavaScript SDK), In the line 'Click Close. We can now run JavaScript code from within the Cognito JS tab, as we did in the previous recipe:' replace Cognito JS tab with Codepen JS tab.
  2. Also in the same recipe 2, bullet point numbers are marked wrongly. It should be like below.

5:In the Settings menu, select the JavaScript tab and do the following:

  1. Search for aws sdk and select the appropriate SDK:
  2. Add the URL of our amazon-cognito-identity.min.js file (for example, https://s3.amazonaws.com/cognito-min-bucket/amazon-cognito-identity.min.js):
  3. Click Close. We can now run JavaScript code from within the Codepen JS tab, as we did in the previous recipe:

6:We can sign up/register the user with the following code:

 

Contact

We learn together, do innovations and then document them.

Offline Contact
We connect physically only in Bengaluru currently, but most of our activities happen online. Please follow us here or in social media for more details.
WhatsApp (Primary): (+91) 7411174113
WhatsApp (Secondary): (+91) 7411174114

Business newsletter

Complete the form below, and we'll send you an e-mail every now and again with all the latest news.

About Cloudericks

Team Cloudericks is a community to learn about and master cloud computing. Current learning focus is on AWS cloud.

We believe that knowledge is useless unless you share it; the more you share, the more you learn. Visit Cloudericks.

Recent comments

Photo Stream