We are open sourcing two AWS CDK constructs under the MIT license

We strive for Infrastructure as Code using the AWS CDK TypeScript libraries.

Our motivation for these two constructs is based on an outage earlier this year. We were migrating our domains to Route53 and ran into the following scenario

  • The AWS Route53 domain migration can take up to two weeks and can happen at any day and at any time during those two weeks
  • The AWS Route53 domain migration does not migrate DNS records resulting in an empty hosted zone associated with the domain in Route53

When the migration then happened on a Saturday in January, the domains showed up with no records associated in Route53. And because the domains were already gone from our old registrar, we also could not just copy over the DNS records.

This incident motivated us to capture even the smallest domain settings in code, such as our Google Workspace and Squarespace domain setup.

Today we are open sourcing two AWS CDK constructs to benefit the broader community

npm install aws-cdk-squarespace
npm install aws-cdk-google-workspace
import { App, Stack, StackProps } from "@aws-cdk/core";
import { HostedZone } from "@aws-cdk/aws-route53";

import { GoogleWorkspace } from "aws-cdk-google-workspace";
import { Squarespace } from "aws-cdk-squarespace";

class MyStack extends Stack {
  constructor(scope: App, id: string, props?: StackProps) {
    super(scope, id, props)

    const hostedZone = HostedZone.fromLookup(this, "HostedZone", {
      domainName: "example.com",

    // To manage the domain settings required for your Squarespace page
    new Squarespace(this, "Squarespace", {
      hostedZone: hostedZone,
      verificationCode: "squarespace-verification-code",

    // To manage the domain settings required for Google Workspace
    new GoogleWorkspace(this, "GoogleWorkspace", {
      hostedZone: hostedZone,
      verificationCode: "google-workspace-verification-code",

These constructs manage all required DNS records; check it out on GitHub

Want to leave feedback? Reach out at hello@ruumi.io