-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpythonwa.py
More file actions
executable file
·54 lines (49 loc) · 2.31 KB
/
pythonwa.py
File metadata and controls
executable file
·54 lines (49 loc) · 2.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/env python3
import aws_cdk as cdk
from stacks.serverless_backend_stack import ServerlessBackendStack
from stacks.static_site import StaticWebStack
AWS_ACCOUNT = "155122333172"
AWS_REGION = "ap-southeast-2"
SITE_DOMAIN_NAME = "pythonwa.com"
DOMAIN_CERTIFICATE_ARN = (
"arn:aws:acm:us-east-1:155122333172:certificate/3bba3daa-5daf-4c47-9ce1-248feb820921"
)
HOSTED_ZONE_ID = "Z03934201M8O7YD4DTYVA"
HOSTED_ZONE_NAME = "pythonwa.com"
app = cdk.App()
StaticWebStack(
app,
"StaticWebStack",
site_domain_name=SITE_DOMAIN_NAME,
domain_certificate_arn=DOMAIN_CERTIFICATE_ARN,
hosted_zone_id=HOSTED_ZONE_ID,
hosted_zone_name=HOSTED_ZONE_NAME,
# 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=AWS_ACCOUNT, region=AWS_REGION),
# For more information, see https://docs.aws.amazon.com/cdk/latest/guide/environments.html
)
ServerlessBackendStack(
app,
"ServerlessBackendStack",
domain_certificate_arn=DOMAIN_CERTIFICATE_ARN,
hosted_zone_id=HOSTED_ZONE_ID,
hosted_zone_name=HOSTED_ZONE_NAME,
# 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=AWS_ACCOUNT, region=AWS_REGION),
# For more information, see https://docs.aws.amazon.com/cdk/latest/guide/environments.html
)
app.synth()