You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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):
OS: Windows 10
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.
The text was updated successfully, but these errors were encountered:
I'm running CDK on Lubuntu 22.04.3. I'm using a virtualenv environment. I had the same issue. I did the following to fix it. Make sure you're in venv mode and in the root directory for the code. (This is after following all the steps in the guide right before cdk deploy).
The code in the repo uses "aws-cdk-lib==2.0.0-rc.21". You have to upgrade this to the latest version. (2.128.0 (build d995261)) is working for me. pip install --upgrade aws-cdk-lib
You have to bootstrap CDK. This will create a bucket and CloudFormation stack in your AWS account. cdk bootstrap
You just then have to deploy. cdk deploy
To clean up the bootstrap. You can refer to here. You can keep it for future CDK use though. Albeit late, I hope this also helps others.
Describe the bug
Running
cdk deploy
creates error: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.
The text was updated successfully, but these errors were encountered: