Lunker - Gone Fishing!

blog.lukach.io

Amazon Cloud

GitHub Profile

December 11, 2025

ClickOps #5 - Cloud Development Kit Bootstrap

by John Lukach

CloudFormation StackSets is used to deploy the Cloud Development Kit (CDK) Bootstrap, which will help me move from ClickOps to Infrastructure-as-Code (IaC). In the management account, I need to enable trust access for the organization.

organization trust

I previously set up a new StackSets account to register the delegated administrator from the management account.

delegated administrator

In the StackSets account, I need to create an S3 bucket to host the CDK Bootstrap CloudFormation template.

https://github.com/jblukach/cdkv2/blob/main/bootstrap/template.yaml

s3 bucket

s3 bucket

s3 bucket)

The S3 bucket needs the s3:GetObject permission across the organization, granted via a Bucket Policy.

bucket policy

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": {
                "AWS": "*"
            },
            "Action": "s3:ListBucket",
            "Resource": "arn:aws:s3:::stacksets-deployment-lukach-io",
            "Condition": {
                "StringEquals": {
                    "aws:PrincipalOrgID": "o-xxxxxxxxxx"
                }
            }
        },
        {
            "Effect": "Allow",
            "Principal": {
                "AWS": "*"
            },
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::stacksets-deployment-lukach-io/*",
            "Condition": {
                "StringEquals": {
                    "aws:PrincipalOrgID": "o-xxxxxxxxxx"
                }
            }
        }
    ]
}

Now I can set up a Service-Managed StackSet that handles the IAM permissions.

stacksets

Choose a template

stacksets

Specify stack set details

stacksets

stacksets

Configure stack set options

stacksets

Set deployment options

stacksets

stacksets

Review

tags: aws - cdk - cloudformation - stacksets - bootstrap