Skip to content

Instantly share code, notes, and snippets.

View PacoVK's full-sized avatar
👽

Pascal Euhus PacoVK

👽
View GitHub Profile
@PacoVK
PacoVK / accountCreator.ts
Created November 28, 2022 09:35
AWS Account creator
import { AccountOrder, EnvironmentType } from "../types";
import { ServiceCatalog } from "aws-sdk";
# Get this ID from the AWS console (Service Catalog Product)
# https://eu-central-1.console.aws.amazon.com/servicecatalog/home?region=eu-central-1#products
const { AWS_CONTROL_TOWER_SC_PRODUCT_ID } = process.env;
if (!AWS_CONTROL_TOWER_SC_PRODUCT_ID) {
throw new Error("AWS_CONTROL_TOWER_SC_PRODUCT_ID must be set");
}