1.153.1 • Published 2 years ago

@makemydeal/cdk-static-website v1.153.1

Weekly downloads
129
License
ISC
Repository
-
Last release
2 years ago

cdk-static-website

This package will provide stacks/managers to create multiple region buckets with replication along with setting up cloudfront.

Stacks

StackDescription
ClientStackThis will configure CloudFront. This will also create the S3 bucket to host the website. It can also setup replication with other buckets (make sure those buckets are created first)
WebsiteBucketStackThis will allow for creation of website S3 buckets. It can be useful to use prior to the ClientStack when setting up replication

ClientStack Properties

PropertyRequiredTypeDescription
applicationNameYesstringName of the application and used as a prefix for all lambda names
environmentNameYesstringThe logical environment (dev, qa, etc)
enableWafNobooleanShould a WAF be in front of the Cloudfront Configuration
networkYesClientStackNetworkPropsNetwork Configuration
s3DefaultCacheTtlNoDurations3DefaultCacheTtl (86400 is the default if not specified)
removalPolicyNoRemovalPolicyWhen this stack is removed, what should happen to the bucket? (RemovalPolicy.RETAIN is the default)
replicationNoWebsiteBucketReplicationPropsThe failover bucket and the IAMFactory used to get the s3-replication-role
bucketNameNostringThe name of the bucket to store the artifacts. If not specified, the name will be ${applicationName}-${environmentName}-static-website-${region}

WebsiteBucketStack Properties

PropertyRequiredTypeDescription
applicationNameYesstringName of the application and used as a prefix for all lambda names
environmentNameYesstringThe logical environment (dev, qa, etc)
bucketNameYesstringThe name of the bucket
removalPolicyNoRemovalPolicyWhen this stack is removed, what should happen to the bucket? (RemovalPolicy.RETAIN is the default)
websiteIndexDocumentNostringThe index page of the site (index.html is the default)
websiteErrorDocumentNostringThe error page of the site (error.html is the default)
versionedNobooleanShould the artifacts be versioned (the default is yes)
bucketEncryptionNoBucketEncryptionShould the bucket be encrypted (Default is bucketEncryption.S3_MANAGED)
encryptionFactoryNoConstructFactoryA factory to get encryption. Only used if the bucketEncryption is KMS

Managers

Managers are used to have a consolidated object that will control the CICD and Build process. This allows the same object to be passed to the CICD and APP setups. They allow for custom actions to be run during the IAC Setup, the Environment Setup, and when creating the stack. These managers will be passed to the CICD process.

Each stack above has a corresponding manager:

  • ClientStackManager
  • WebsiteBucketStackManager

ClientStackManager

Managers can take a list of regions to work within to set up multi region deployment. For the client stack, however, CloudFront can only be deployed to 1 region. Therefore, make sure to supply only 1 region in the regions property for multi region deployments.

WebsiteBucketStackManager

Conversely, for buckets used for replication, you should specify all of the regions except the main one. This will create the child buckets which you can then pass into the ClientStack.

Parameters

In order to setup bucket replication, we need a role. The IAM construct has a s3ReplicationRole property which gets that role from SSM. /dr/global/iam/s3-replication-role is the value that needs to be put into SSM, and should be an ARN for the role to use. By default, IAMFactory is used which will get the construct, but you can specify your own.

1.153.1

2 years ago

1.153.2-alpha.0

2 years ago

1.143.42

2 years ago

1.143.41

2 years ago

1.143.44

2 years ago

1.143.43

2 years ago

1.143.42-alpha.0

2 years ago

1.143.42-alpha.1

2 years ago

1.143.35

2 years ago

1.143.37

2 years ago

1.143.36

2 years ago

1.143.37-alpha.3

2 years ago

1.143.37-alpha.2

2 years ago

1.143.37-alpha.1

2 years ago

1.143.37-alpha.0

2 years ago

1.143.40

2 years ago

1.143.39

2 years ago

1.143.38

2 years ago

1.143.7-alpha.0

2 years ago

1.143.31

2 years ago

1.143.30

2 years ago

1.143.32

2 years ago

1.143.28

2 years ago

1.143.27

2 years ago

1.143.29

2 years ago

1.143.31-alpha.3

2 years ago

1.143.24

2 years ago

1.143.31-alpha.2

2 years ago

1.143.23

2 years ago

1.143.31-alpha.1

2 years ago

1.143.26

2 years ago

1.143.31-alpha.0

2 years ago

1.143.25

2 years ago

1.143.22

2 years ago

1.143.21

2 years ago

1.143.10-alpha.0

2 years ago

1.143.31-alpha.4

2 years ago

1.143.14-alpha.0

2 years ago

1.143.14

2 years ago

1.143.6-alpha.0

2 years ago

1.143.26-alpha.8

2 years ago

1.143.13-alpha.0

2 years ago

1.143.26-alpha.7

2 years ago

1.143.26-alpha.1

2 years ago

1.143.26-alpha.0

2 years ago

1.143.32-alpha.2

2 years ago

1.143.26-alpha.5

2 years ago

1.143.32-alpha.1

2 years ago

1.143.26-alpha.4

2 years ago

1.143.32-alpha.0

2 years ago

1.143.26-alpha.3

2 years ago

1.143.26-alpha.2

2 years ago

1.143.32-alpha.4

2 years ago

1.143.32-alpha.3

2 years ago

1.143.9-alpha.0

2 years ago

1.143.12-alpha.0

2 years ago

1.143.8-alpha.0

2 years ago

1.143.30-alpha.1

2 years ago

1.143.30-alpha.2

2 years ago

1.143.30-alpha.0

2 years ago

1.143.11-alpha.0

2 years ago

1.143.15-alpha.0

2 years ago

1.143.5

2 years ago

1.106.1-alpha.0

2 years ago

1.111.0

2 years ago

1.114.0

2 years ago

1.143.1

2 years ago

1.143.2

2 years ago

1.143.3

2 years ago

1.106.2-alpha.0

2 years ago

1.113.0

2 years ago

1.103.0

3 years ago

1.106.0

3 years ago

1.105.0

3 years ago

1.104.0

3 years ago

1.103.1-alpha.0

3 years ago

1.102.0

3 years ago

1.101.0

3 years ago

1.100.1-alpha.0

3 years ago

1.98.0

3 years ago

1.95.1-alpha.0

3 years ago

1.95.2-alpha.0

3 years ago

1.96.0

3 years ago

1.95.3-alpha.0

3 years ago

1.100.0

3 years ago

1.95.4-alpha.0

3 years ago

1.94.0

3 years ago

1.93.0

3 years ago

1.92.0

3 years ago

1.94.1-alpha.0

3 years ago

1.95.0

3 years ago

1.90.0

3 years ago

1.89.0

3 years ago

1.88.0

3 years ago

1.84.0

3 years ago

1.86.0

3 years ago

1.85.0

3 years ago

1.87.0

3 years ago

1.83.0

3 years ago

1.82.3-alpha.0

3 years ago

1.82.5-alpha.0

3 years ago

1.82.1-alpha.0

3 years ago

1.82.9-alpha.0

3 years ago

1.82.7-alpha.0

3 years ago

1.82.10-alpha.0

3 years ago

1.82.6-alpha.0

3 years ago

1.82.2-alpha.0

3 years ago

1.82.8-alpha.0

3 years ago

1.79.0

3 years ago

1.80.0

3 years ago

1.82.0

3 years ago

1.78.0

3 years ago

1.81.0

3 years ago

1.76.1-alpha.0

3 years ago

1.76.2-alpha.0

3 years ago

1.77.0

3 years ago

1.75.3-alpha.0

3 years ago

1.75.1-alpha.0

3 years ago

1.75.5-alpha.0

3 years ago

1.76.0

3 years ago

1.75.2-alpha.0

3 years ago

1.75.4-alpha.0

3 years ago

1.74.0

3 years ago

1.72.2-alpha.0

3 years ago

1.73.0

3 years ago

1.72.1-alpha.0

3 years ago

1.72.0

3 years ago

1.69.2-alpha.0

3 years ago

1.70.0

3 years ago

1.69.0

3 years ago

1.68.18-alpha.0

3 years ago

1.69.1-alpha.0

3 years ago

1.68.16-alpha.0

3 years ago

1.68.15-alpha.0

3 years ago

1.68.17-alpha.0

3 years ago

1.68.14-alpha.0

3 years ago

1.68.12-alpha.0

3 years ago

1.68.10-alpha.0

3 years ago

1.68.8-alpha.0

3 years ago

1.68.13-alpha.0

3 years ago

1.68.11-alpha.0

3 years ago

1.68.7-alpha.0

3 years ago

1.68.9-alpha.0

3 years ago

1.68.3-alpha.0

3 years ago

1.68.4-alpha.0

3 years ago

1.68.1-alpha.0

3 years ago

1.67.0

3 years ago

1.66.1-alpha.0

3 years ago

1.66.2-alpha.0

3 years ago

1.66.0

3 years ago

1.64.6-alpha.0

3 years ago

1.65.0

3 years ago

1.64.0

3 years ago

1.63.0

3 years ago

1.62.0

3 years ago

1.61.1-alpha.0

3 years ago

1.61.2-alpha.0

3 years ago

1.60.0

3 years ago

1.61.0

3 years ago

1.59.0

3 years ago

1.58.9-alpha.0

3 years ago

1.58.8-alpha.0

3 years ago

1.58.7-alpha.0

3 years ago

1.58.5-alpha.0

3 years ago

1.58.4-alpha.0

3 years ago

1.58.2-alpha.0

3 years ago

1.58.1-alpha.0

3 years ago

1.58.0

3 years ago

1.56.0

3 years ago

1.55.0

3 years ago

1.51.0

3 years ago

1.50.0

3 years ago

1.49.2-alpha.0

3 years ago

1.49.1-alpha.0

3 years ago

1.49.3-alpha.0

3 years ago

1.49.4-alpha.0

3 years ago

1.49.0-alpha.0

3 years ago

1.47.0

3 years ago

1.45.0

3 years ago

1.44.1-alpha.0

3 years ago

1.45.1-alpha.0

3 years ago

1.44.0

3 years ago

1.45.2-alpha.0

3 years ago

1.43.4-alpha.0

3 years ago

1.43.3-alpha.0

3 years ago

1.43.2-alpha.0

3 years ago

1.43.1-alpha.0

3 years ago