-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(AWS-CDK): (not able to run the CDK synth command on local machine) #29945
Comments
@rameshjoshi13 Good afternoon. Somehow I'm unable to reproduce the issue. Have you followed instructions at the below documentation properly:
I was able to follow the instructions to the point and Resources:
CDKMetadata:
Type: AWS::CDK::Metadata
Properties:
Analytics: v2:deflate64:H4sIAAAAAAAA/zPSMzS21DNQTCwv1k1OydbNyUzSqw4uSUzO1nFOywtKLc4vLUpOBbGd8/NSMksy8/NqdQIqSzLy8/SN9QyN9IwVs4ozM3WLSvNKMnNT9YIgNABkjCGkVwAAAA==
Metadata:
aws:cdk:path: Issue29945PythonStack/CDKMetadata/Default
Condition: CDKMetadataAvailable
Conditions:
CDKMetadataAvailable:
Fn::Or:
- Fn::Or:
- Fn::Equals:
- Ref: AWS::Region
- af-south-1
- Fn::Equals:
- Ref: AWS::Region
- ap-east-1
- Fn::Equals:
- Ref: AWS::Region
- ap-northeast-1
- Fn::Equals:
- Ref: AWS::Region
- ap-northeast-2
- Fn::Equals:
- Ref: AWS::Region
- ap-south-1
- Fn::Equals:
- Ref: AWS::Region
- ap-southeast-1
- Fn::Equals:
- Ref: AWS::Region
- ap-southeast-2
- Fn::Equals:
- Ref: AWS::Region
- ca-central-1
- Fn::Equals:
- Ref: AWS::Region
- cn-north-1
- Fn::Equals:
- Ref: AWS::Region
- cn-northwest-1
- Fn::Or:
- Fn::Equals:
- Ref: AWS::Region
- eu-central-1
- Fn::Equals:
- Ref: AWS::Region
- eu-north-1
- Fn::Equals:
- Ref: AWS::Region
- eu-south-1
- Fn::Equals:
- Ref: AWS::Region
- eu-west-1
- Fn::Equals:
- Ref: AWS::Region
- eu-west-2
- Fn::Equals:
- Ref: AWS::Region
- eu-west-3
- Fn::Equals:
- Ref: AWS::Region
- il-central-1
- Fn::Equals:
- Ref: AWS::Region
- me-central-1
- Fn::Equals:
- Ref: AWS::Region
- me-south-1
- Fn::Equals:
- Ref: AWS::Region
- sa-east-1
- Fn::Or:
- Fn::Equals:
- Ref: AWS::Region
- us-east-1
- Fn::Equals:
- Ref: AWS::Region
- us-east-2
- Fn::Equals:
- Ref: AWS::Region
- us-west-1
- Fn::Equals:
- Ref: AWS::Region
- us-west-2
Parameters:
BootstrapVersion:
Type: AWS::SSM::Parameter::Value<String>
Default: /cdk-bootstrap/hnb659fds/version
Description: Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]
Rules:
CheckBootstrapVersion:
Assertions:
- Assert:
Fn::Not:
- Fn::Contains:
- - "1"
- "2"
- "3"
- "4"
- "5"
- Ref: BootstrapVersion
AssertDescription: CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI. Thanks, |
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one. |
Describe the bug
I have the below version for my aws-cdk
D:\AWS_PYTHON_CDK>npm --version 10.5.2
D:\AWS_PYTHON_CDK>node --version v20.12.2
D:\AWS_PYTHON_CDK>python --version Python 3.12.3
D:\AWS_PYTHON_CDK>aws --version aws-cli/2.15.40 Python/3.11.8 Windows/10 exe/AMD64 prompt/off
D:\AWS_PYTHON_CDK>cdk --version 2.138.0 (build 6b41c8b)
I am able to create a python cdk project inside the AWS_PYTHON_CDK folder using cdk init and the requirement.txt file is showing the dependencies to be installed as aws-cdk-lib==2.138.0 constructs>=10.0.0,<11.0.0
but when I am trying to do cdk synth its throwing error, the error trace is as below.
D:\AWS_PYTHON_CDK>cdk synth Traceback (most recent call last): File "D:\AWS_PYTHON_CDK\app.py", line 4, in import aws_cdk as cdk File "C:\Users\abc\AppData\Local\Programs\Python\Python312\Lib\site-packages\aws_cdk_init_.py", line 1511, in from .jsii import * File "C:\Users\abc\AppData\Local\Programs\Python\Python312\Lib\site-packages\aws_cdk_jsii_init.py", line 21, in jsii_assembly = jsii.JSIIAssembly.load( ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\abc\AppData\Local\Programs\Python\Python312\Lib\site-packages\jsii_runtime.py", line 55, in load kernel.load(assembly.name, assembly.version, os.fspath(assembly_path)) File "C:\Users\abc\AppData\Local\Programs\Python\Python312\Lib\site-packages\jsii_kernel_init.py", line 299, in load self.provider.load(LoadRequest(name=name, version=version, tarball=tarball)) File "C:\Users\abc\AppData\Local\Programs\Python\Python312\Lib\site-packages\jsii_kernel\providers\process.py", line 354, in load return self._process.send(request, LoadResponse) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\abc\AppData\Local\Programs\Python\Python312\Lib\site-packages\jsii_kernel\providers\process.py", line 332, in send self._next_message(), _ProcessResponse ^^^^^^^^^^^^^^^^^^^^ File "C:\Users\abc\AppData\Local\Programs\Python\Python312\Lib\site-packages\jsii_kernel\providers\process.py", line 251, in _next_message return json.loads(self.process.stdout.readline(), object_hook=ohook) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\abc\AppData\Local\Programs\Python\Python312\Lib\json_init.py", line 359, in loads return cls(**kw).decode(s) ^^^^^^^^^^^^^^^^^^^ File "C:\Users\abc\AppData\Local\Programs\Python\Python312\Lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\abc\AppData\Local\Programs\Python\Python312\Lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) Exception ignored in atexit callback: <bound method _NodeProcess.stop of <jsii._kernel.providers.process._NodeProcess object at 0x000002830E43D880>> Traceback (most recent call last): File "C:\Users\abc\AppData\Local\Programs\Python\Python312\Lib\site-packages\jsii_kernel\providers\process.py", line 295, in stop self._process.stdin.close() OSError: [Errno 22] Invalid argument
Expected Behavior
It should generate the output instead of throwing error.
Current Behavior
Its throwing an error on executing command "cdk synth" as mentioned above in the description
Reproduction Steps
Run command - cdk synth
Possible Solution
No response
Additional Information/Context
I have configure AWS properly and have confirmed by running the command
aws sts get-caller-identity and got response in below format.
{
"UserId": "AID************",
"Account": "767********",
"Arn": "arn:aws:iam::767********:user/testuser"
}
CDK CLI Version
2.138.0
Framework Version
No response
Node.js Version
v20.12.2
OS
windows 10
Language
Python
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: