Errata

AWS Cookbook

Errata for AWS Cookbook

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date submitted Date corrected
Page n/a
page 51

Problem on github files from chapter 203

on the file readme.md by typing all those command go through
cd 203-Utilizing-Internet-Gateways/cdk-AWS-Cookbook-203/
test -d .venv || python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt

apart for the deployment

cdk deploy

it gives this error

Traceback (most recent call last):
File "app.py", line 9, in <module>
CdkAwsCookbook203Stack(app, "cdk-aws-cookbook-203")
File "/Users/johncarlosbuen/AWSCookbook/Networking/203-Utilizing-Internet-Gateways/cdk-AWS-Cookbook-203/.venv/lib/python3.8/site-packages/jsii/_runtime.py", line 86, in __call__
inst = super().__call__(*args, **kwargs)
File "/Users/johncarlosbuen/AWSCookbook/Networking/203-Utilizing-Internet-Gateways/cdk-AWS-Cookbook-203/cdk_aws_cookbook_203/cdk_aws_cookbook_203_stack.py", line 17, in __init__
subnet_type=ec2.SubnetType.ISOLATED,
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/enum.py", line 341, in __getattr__
raise AttributeError(name) from None
AttributeError: ISOLATED
Subprocess exited with error 1

seems the subnet_type must be the following subnet_type=ec2.SubnetType.PRIVATE_ISOLATED
subnet_type=ec2.SubnetType.ISOLATED this has been deprecated

Note from the Author or Editor:
Updated deprecated ec2.SubnetType ENUM in supporting GitHub repo file: https://github.com/AWSCookbook/Networking/blob/main/203-Utilizing-Internet-Gateways/cdk-AWS-Cookbook-203/cdk_aws_cookbook_203/cdk_aws_cookbook_203_stack.py

john  Mar 07, 2022 
Page 10
Step #1

The "iam update-account-password-policy" generates an error: "invalid literal for int() with base 10: 'true'"
parameter --password-reuse-prevention takes an integer, not "true"
see awscli.amazonaws.com/v2/documentation/api/latest/reference/iam/update-account-password-policy.html

Note from the Author or Editor:
password-reuse-prevention need to be set to an integer (we'll use 1) instead of true (see below)

aws iam update-account-password-policy \
--minimum-password-length 32 \
--require-symbols \
--require-numbers \
--require-uppercase-characters \
--require-lowercase-characters \
--allow-users-to-change-password \
--max-password-age 90 \
--password-reuse-prevention 1

Eric Parent  Dec 03, 2022