# For consistency with TypeScript code, `cdk` is the preferred import name for # the CDK's core module. The following line also imports it as `core` for use # with examples from the CDK Developer's Guide, which are in the process of # being updated to use `cdk`. You may delete this import if you don't need it. from aws_cdk import core from hello_cdk.hello_cdk_stack import HelloCdkStack app = core.App() HelloCdkStack( app, "HelloCdkStack", # 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=core.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=core.Environment(account='123456789012', region='us-east-1'), # For more information, see https://docs.aws.amazon.com/cdk/latest/guide/environments.html ) app.synth()
#!/usr/bin/env python3 from aws_cdk import core from hello_cdk.hello_cdk_stack import HelloCdkStack app = core.App() HelloCdkStack(app, "HelloCdkStack") app.synth()
#!/usr/bin/env python3 from aws_cdk import core import aws_cdk.aws_sqs as sqs from hello_cdk.hello_cdk_stack import HelloCdkStack stack_tags = {"systemCode": "id-rnd", "teamDL": "*****@*****.**", "environment": "d"} app = core.App() HelloCdkStack(app, "hello-cdk", tags=stack_tags) app.synth()
#!/usr/bin/env python3 from aws_cdk import core from hello_cdk_pipeline.hello_cdk_pipeline_stack import HelloCdkPipelineStack from hello_cdk.hello_cdk_stack import HelloCdkStack app = core.App() hello_cdk = HelloCdkStack(app, "hello-cdk") HelloCdkPipelineStack(app, "hello-cdk-pipeline", deploy_stack=hello_cdk) app.synth()
#!/usr/bin/env python3 from aws_cdk import core from hello_cdk.hello_cdk_stack import HelloCdkStack app = core.App() HelloCdkStack(app, "HelloCdkStack", env=core.Environment(region="us-east-1", account="001178231653")) app.synth()