Susan Harkins (344) [Avatar] Offline
#1
Please list errors you find in the published version of Serverless Architectures on AWS here. If necessary, we'll publish a comprehensive list for everyone's convenience. Thank you!

Susan Harkins
Errata Editor
Manning Publications
Rails4G (19) [Avatar] Offline
#2
latest code
Noticed book has slight differences from latest code on this site and github. Both will work but which is preferred?

e.g., Listing 3.1 doesn't have console.log welcome and has console.log for keys.

Listing B.1 package.json

aws-sdk": "latest" in book vs. code => aws-sdk": "^2.3.2"
Rails4G (19) [Avatar] Offline
#3
Changing ACL of S3 object not working
Having issue with Listing 3.6. No error but it's not changing the ACLs of the files.

var params = {
Bucket: sourceBucket,
Key: sourceKey,
ACL: 'public-read'
};

s3.putObjectAcl(params, function(err, data){
if (err) {
callback(err);
Rails4G (19) [Avatar] Offline
#4
Page 193 "Optimizing the gateway" - Figure 7.15 shows two screen shots which are identical.
Rails4G (19) [Avatar] Offline
#5
Page 239 (ch. 9)
It creates a key called "transcoding" not "processing"

"The function pushVideoEntryToFirebase will create a key called processing with a value set to true."
85212 (4) [Avatar] Offline
#6
Changing ACL of S3 object not working
I am also finding that its not changing the ACLs.. smilie


Rails4G wrote:Having issue with Listing 3.6. No error but it's not changing the ACLs of the files.

var params = {
Bucket: sourceBucket,
Key: sourceKey,
ACL: 'public-read'
};

s3.putObjectAcl(params, function(err, data){
if (err) {
callback(err);
38786 (7) [Avatar] Offline
#7
Changing ACL of S3 object not working
Also running into this issue. I looked in the logs and get the following Access Denied Error:

2017-07-28T04:09:58.259Z 9d7d061a-734a-11e7-82ae-c7b752a6e431
{
"errorMessage": "Access Denied",
"errorType": "AccessDenied",
"stackTrace": [
"Request.extractError (/var/task/node_modules/aws-sdk/lib/services/s3.js:577:35)",
"Request.callListeners (/var/task/node_modules/aws-sdk/lib/sequential_executor.js:105:20)",
"Request.emit (/var/task/node_modules/aws-sdk/lib/sequential_executor.js:77:10)",
"Request.emit (/var/task/node_modules/aws-sdk/lib/request.js:683:14)",
"Request.transition (/var/task/node_modules/aws-sdk/lib/request.js:22:10)",
"AcceptorStateMachine.runTo (/var/task/node_modules/aws-sdk/lib/state_machine.js:14:12)",
"/var/task/node_modules/aws-sdk/lib/state_machine.js:26:10",
"Request.<anonymous> (/var/task/node_modules/aws-sdk/lib/request.js:38:9)",
"Request.<anonymous> (/var/task/node_modules/aws-sdk/lib/request.js:685:12)",
"Request.callListeners (/var/task/node_modules/aws-sdk/lib/sequential_executor.js:115:1smilie"
]
}


I thought that perhaps this was similar to the permissions issues described in the sidebar in section 3.1.7 and tried setting up the trigger from the Lambda side of things. The ACLs are still not getting set for the public. Please Advise.

Quick Update:
In the AWS console I went to IAM -> Roles -> lambda-s3-execution-role and clicked the attach policy button and attached AmazonS3FullAccess policy and was able to see the permissions be set to public read access when I uploaded a new video. I'm sure this isn't what we are supposed to do and I don't know all the implications of granting this potentially very open policy to the role.


85212 wrote:I am also finding that its not changing the ACLs.. smilie


Rails4G wrote:Having issue with Listing 3.6. No error but it's not changing the ACLs of the files.

var params = {
Bucket: sourceBucket,
Key: sourceKey,
ACL: 'public-read'
};

s3.putObjectAcl(params, function(err, data){
if (err) {
callback(err);
520987 (1) [Avatar] Offline
#8
ERRATA SUGGESTIONS:
------------------------------------------------------------------------------
#1)
3.3.2
...
In the ARN textbox, type arn:aws:s3:::<your-bucket-name>/*, where <your-bucket-name> is the name of your bucket for transcoded videos.


The " */, " is an error.

-------------------------------------------------------------------------------
#2)
At the end of 3.2.1, it is impossible to tell the 1 from the l in the book's font for this link:

http://amzn.to/1pgkl4X
472618 (13) [Avatar] Offline
#9
Changing ACL of S3 object not working
38786 wrote:Also running into this issue. I looked in the logs and get the following Access Denied Error:

2017-07-28T04:09:58.259Z 9d7d061a-734a-11e7-82ae-c7b752a6e431
{
"errorMessage": "Access Denied",
"errorType": "AccessDenied",
"stackTrace": [
"Request.extractError (/var/task/node_modules/aws-sdk/lib/services/s3.js:577:35)",
"Request.callListeners (/var/task/node_modules/aws-sdk/lib/sequential_executor.js:105:20)",
"Request.emit (/var/task/node_modules/aws-sdk/lib/sequential_executor.js:77:10)",
"Request.emit (/var/task/node_modules/aws-sdk/lib/request.js:683:14)",
"Request.transition (/var/task/node_modules/aws-sdk/lib/request.js:22:10)",
"AcceptorStateMachine.runTo (/var/task/node_modules/aws-sdk/lib/state_machine.js:14:12)",
"/var/task/node_modules/aws-sdk/lib/state_machine.js:26:10",
"Request.<anonymous> (/var/task/node_modules/aws-sdk/lib/request.js:38:9)",
"Request.<anonymous> (/var/task/node_modules/aws-sdk/lib/request.js:685:12)",
"Request.callListeners (/var/task/node_modules/aws-sdk/lib/sequential_executor.js:115:1smilie"
]
}


I thought that perhaps this was similar to the permissions issues described in the sidebar in section 3.1.7 and tried setting up the trigger from the Lambda side of things. The ACLs are still not getting set for the public. Please Advise.

Quick Update:
In the AWS console I went to IAM -> Roles -> lambda-s3-execution-role and clicked the attach policy button and attached AmazonS3FullAccess policy and was able to see the permissions be set to public read access when I uploaded a new video. I'm sure this isn't what we are supposed to do and I don't know all the implications of granting this potentially very open policy to the role.


85212 wrote:I am also finding that its not changing the ACLs.. smilie


Rails4G wrote:Having issue with Listing 3.6. No error but it's not changing the ACLs of the files.

var params = {
Bucket: sourceBucket,
Key: sourceKey,
ACL: 'public-read'
};

s3.putObjectAcl(params, function(err, data){
if (err) {
callback(err);



This works fine for me, I suspect you didn't successfully complete the steps on the top of page 59 where you give the lambda role more the required s3 permissions. Maybe you didnt click "add statement"...
472618 (13) [Avatar] Offline
#10
8.3.2, listing 8.10
listing 8.10 does not show all changes necessary for the new lambda function.

a files var needs to be created, the result var needs to be modified and encoding needs to take place