awscookbook / security Goto Github PK
View Code? Open in Web Editor NEWChapter 1 of the AWS Cookbook
Home Page: https://www.amazon.com/AWS-Cookbook-Recipes-Success/dp/1492092606/
License: MIT License
Chapter 1 of the AWS Cookbook
Home Page: https://www.amazon.com/AWS-Cookbook-Recipes-Success/dp/1492092606/
License: MIT License
Describe the bug
Running cdk deploy
creates error:
Traceback (most recent call last):
File "D:\Temp\Security\106-Connecting-to-EC2-Instances-Using-Session-Manager\cdk-AWS-Cookbook-106\app.py", line 10, in <module>
CdkAwsCookbook106Stack(app, "cdk-aws-cookbook-106",
File "D:\Temp\Security\106-Connecting-to-EC2-Instances-Using-Session-Manager\cdk-AWS-Cookbook-106\.venv\lib\site-packages\jsii\_runtime.py", line 112, in __call__
inst = super().__call__(*args, **kwargs)
File "D:\Temp\Security\106-Connecting-to-EC2-Instances-Using-Session-Manager\cdk-AWS-Cookbook-106\cdk_aws_cookbook_106\cdk_aws_cookbook_106_stack.py", line 18, in __init__
subnet_type=ec2.SubnetType.PRIVATE_ISOLATED,
File "C:\Users\dave\AppData\Local\Programs\Python\Python310\lib\enum.py", line 437, in __getattr__
raise AttributeError(name) from None
AttributeError: PRIVATE_ISOLATED
Subprocess exited with error 1
(.venv)
Desktop (please complete the following information):
Is this an easy fix? Alternatively, is there a way to just use CloudFormation templates from the AWS console? I'm not a Python developer so don't know how to resolve this.
Creating a role using AWS CLI generates the following error:
An error occurred (MalformedPolicyDocument) when calling the CreateRole operation: This policy contains invalid Json
ROLE_ARN=$(aws iam create-role --role-name AWSCookbook101Role --assume-role-policy-document assume-role-policy.json --output text --query Role.Arn)
Expected behavior
A clear and concise description of what you expected to happen.
Desktop (please complete the following information):
JSON is happily accepted when creating the role through the AWS UI. I'm inclined to think I'm fat fingering something or something about AWS CLI doesn't like the formatting somewhere.
Describe the bug
In Receipe 1.4 $AWS_ACCOUNT_ARN is not what needs to be used, instead the account number needs to be used.
To Reproduce
Steps to reproduce the behavior:
Follow all the steps of the receipe until you reach the validation checks (test the ec2:CreateInternetGateway action)
Expected behavior
The account ARN is not the right parameter here so this will fail and return a different error message than in the book. Instead of using the ACCOUNT_ARN I extracted my account number in a new variable I named AWS_ACCOUNT_NUM and it worked.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.