Hi AWS, this is the follow up question for an issue I raised in the past https://repost.aws/questions/QU1laSwxybRRiFbj1CyMuxRg/cdk-bootstraping. I ran cdk bootstrap --bootstrap-bucket-name=aws-cdk-bootcamp-bucket
and it ran successfully and a CloudFormation Template CDKToolkit has been deployed successfully.
However when I ran cdk deploy --all --bootstrap-bucket-name=aws-cdk-bootcamp-bucket
, I got this error:
✨ Synthesis time: 12.12s
AwsCdkBootcampStack: start: Building cbf2aebb6eaf329b82b695324e2488fc5c97ed5adb4bb98fb6dfe7d7558af63f:current_account-current_region
AwsCdkBootcampStack: success: Built cbf2aebb6eaf329b82b695324e2488fc5c97ed5adb4bb98fb6dfe7d7558af63f:current_account-current_region
AwsCdkBootcampStack: start: Publishing cbf2aebb6eaf329b82b695324e2488fc5c97ed5adb4bb98fb6dfe7d7558af63f:current_account-current_region
AwsCdkBootcampStack: fail: No bucket named 'cdk-hnb659fds-assets-111111111111-us-east-1'. Is account 111111111111 bootstrapped?
❌ Deployment failed: Error: Failed to publish asset cbf2aebb6eaf329b82b695324e2488fc5c97ed5adb4bb98fb6dfe7d7558af63f:current_account-current_region
at Deployments.publishSingleAsset (C:\Users\amang\AppData\Roaming\npm\node_modules\aws-cdk\lib\index.js:445:11645)
at async Object.publishAsset (C:\Users\amang\AppData\Roaming\npm\node_modules\aws-cdk\lib\index.js:445:197443)
at async C:\Users\amang\AppData\Roaming\npm\node_modules\aws-cdk\lib\index.js:445:181344
Failed to publish asset cbf2aebb6eaf329b82b695324e2488fc5c97ed5adb4bb98fb6dfe7d7558af63f:current_account-current_region
Then I have updated app.py file, and here is the code:
#!/usr/bin/env python3
import os
import aws_cdk as cdk
from aws_cdk import DefaultStackSynthesizer
from aws_cdk_bootcamp.aws_cdk_bootcamp_stack import AwsCdkBootcampStack
app = cdk.App()
AwsCdkBootcampStack(app, "AwsCdkBootcampStack",
**synthesizer=DefaultStackSynthesizer(file_assets_bucket_name="aws-cdk-bootcamp-bucket")**
# If you don't specify 'env', this stack will be environment-agnostic.
# Account/Region-dependent features and context lookups will not work,
# but a single synthesized template can be deployed anywhere.
# Uncomment the next line to specialize this stack for the AWS Account
# and Region that are implied by the current CLI configuration.
#env=cdk.Environment(account=os.getenv('CDK_DEFAULT_ACCOUNT'), region=os.getenv('CDK_DEFAULT_REGION')),
# Uncomment the next line if you know exactly what Account and Region you
# want to deploy the stack to. */
#env=cdk.Environment(account='123456789012', region='us-east-1'),
# For more information, see https://docs.aws.amazon.com/cdk/latest/guide/environments.html
)
app.synth()
and now when I ran the command cdk deploy --all
, I am getting this error: Another CLI (PID=304212) is currently synthing to cdk.out. Invoke the CLI in sequence, or use '--output' to synth into different directories.
Please advise.