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
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.1.0:java (default-cli) on project static-site: An exception occurred while executing the Java class. Error: Cannot retrieve value from context provider hosted-zone since account/region are not specified at the stack level. Configure "env" with an account and region when you define your stack.See https://docs.aws.amazon.com/cdk/latest/guide/environments.html for more details.
[ERROR] @jsii/kernel.RuntimeError: Error: Cannot retrieve value from context provider hosted-zone since account/region are not specified at the stack level. Configure "env" with an account and region when you define your stack.See https://docs.aws.amazon.com/cdk/latest/guide/environments.html for more details.
[ERROR] at Kernel._ensureSync (C:\Users\RAJANA1\AppData\Local\Temp\jsii-java-runtime14064205540975823778\lib\program.js:7889:27)
[ERROR] at Kernel.sinvoke (C:\Users\RAJANA1\AppData\Local\Temp\jsii-java-runtime14064205540975823778\lib\program.js:7325:34)
[ERROR] at KernelHost.processRequest (C:\Users\RAJANA1\AppData\Local\Temp\jsii-java-runtime14064205540975823778\lib\program.js:10466:36)
[ERROR] at KernelHost.run (C:\Users\RAJANA1\AppData\Local\Temp\jsii-java-runtime14064205540975823778\lib\program.js:10429:22)
[ERROR] at Immediate._onImmediate (C:\Users\RAJANA~1\AppData\Local\Temp\jsii-java-runtime14064205540975823778\lib\program.js:10430:46)
[ERROR] at process.processImmediate (node:internal/timers:471:21)
Reproduction Steps
cdk ls
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.43.1 (build c1ebb85)
Framework Version
No response
Node.js Version
nod 18
OS
win 10
Language
Java
Language Version
18
The text was updated successfully, but these errors were encountered:
nagkumar
changed the title
https://github.com/aws-samples/aws-cdk-examples/tree/master/java/static-site does not work
https://github.com/aws-samples/aws-cdk-examples/tree/master/java/static-site is not working
Sep 27, 2022
Able to reproduce the issue by running below commands
mvn compile
cdk ls
cdk bootstrap
cdk deploy -c domain=mystaticsite.com -c subdomain=www --all
Actually, this is considered an warning which only occurs when running cdk synth/deploy/destroy. It DOES NOT block the cdk process as there are default region/account values set in example code or local aws configure.
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
Describe the bug
env variables are correct, but still gives error
Expected Behavior
this example should work locally
Current Behavior
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.1.0:java (default-cli) on project static-site: An exception occurred while executing the Java class. Error: Cannot retrieve value from context provider hosted-zone since account/region are not specified at the stack level. Configure "env" with an account and region when you define your stack.See https://docs.aws.amazon.com/cdk/latest/guide/environments.html for more details.
[ERROR] @jsii/kernel.RuntimeError: Error: Cannot retrieve value from context provider hosted-zone since account/region are not specified at the stack level. Configure "env" with an account and region when you define your stack.See https://docs.aws.amazon.com/cdk/latest/guide/environments.html for more details.
[ERROR] at Kernel._ensureSync (C:\Users\RAJANA
1\AppData\Local\Temp\jsii-java-runtime14064205540975823778\lib\program.js:7889:27)1\AppData\Local\Temp\jsii-java-runtime14064205540975823778\lib\program.js:7325:34)[ERROR] at Kernel.sinvoke (C:\Users\RAJANA
[ERROR] at KernelHost.processRequest (C:\Users\RAJANA
1\AppData\Local\Temp\jsii-java-runtime14064205540975823778\lib\program.js:10466:36)1\AppData\Local\Temp\jsii-java-runtime14064205540975823778\lib\program.js:10429:22)[ERROR] at KernelHost.run (C:\Users\RAJANA
[ERROR] at Immediate._onImmediate (C:\Users\RAJANA~1\AppData\Local\Temp\jsii-java-runtime14064205540975823778\lib\program.js:10430:46)
[ERROR] at process.processImmediate (node:internal/timers:471:21)
Reproduction Steps
cdk ls
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.43.1 (build c1ebb85)
Framework Version
No response
Node.js Version
nod 18
OS
win 10
Language
Java
Language Version
18
The text was updated successfully, but these errors were encountered: