All posts

The simplest way to make CloudFormation TeamCity work like it should

Your pipeline keeps failing twenty minutes into deployment, right after the infrastructure templates start building. The logs blame permissions. You blame the caffeine shortage. What you actually need is to make CloudFormation and TeamCity understand who owns what, when, and how. AWS CloudFormation defines your infrastructure as code. TeamCity handles continuous integration and delivery with the precision of a Swiss watch. But until they trust each other, your pipeline is basically a polite arg

Free White Paper

CloudFormation Guard + End-to-End Encryption: The Complete Guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free. No spam. Unsubscribe anytime.

Your pipeline keeps failing twenty minutes into deployment, right after the infrastructure templates start building. The logs blame permissions. You blame the caffeine shortage. What you actually need is to make CloudFormation and TeamCity understand who owns what, when, and how.

AWS CloudFormation defines your infrastructure as code. TeamCity handles continuous integration and delivery with the precision of a Swiss watch. But until they trust each other, your pipeline is basically a polite argument between two strangers. Connect them properly, and you get real automation with consistent environments instead of hand-tuned chaos.

The core idea is simple. TeamCity triggers builds, CloudFormation applies templates. The magic happens when the build agent carries a temporary AWS identity with the right IAM role. That lets it run stack updates safely without exposing long-lived credentials. Using OIDC or short-lived tokens, TeamCity can assume a predefined role in your AWS account through minimal configuration and never store secrets again.

If your integration feels fragile, start with permissions. Map IAM roles directly to TeamCity projects. Rotate keys automatically. Store environment variables in secure storage rather than agent configs. Always tag CloudFormation stacks per project so you can track ownership later. Most “mystery permission denied” errors trace back to confused policy inheritance, not bugs.

To keep things tight, follow three rules.

Continue reading? Get the full guide.

CloudFormation Guard + End-to-End Encryption: Architecture Patterns & Best Practices

Free. No spam. Unsubscribe anytime.
  1. Separate deployment and build credentials. Never let build agents create IAM users.
  2. Use dedicated CloudFormation execution roles with least privilege. One role per environment keeps audits clean.
  3. Enforce OIDC trust policies from TeamCity to AWS so agents can act without static secrets.

Benefits of integrating CloudFormation with TeamCity:

  • Consistent, versioned Infrastructure-as-Code across environments.
  • Faster deployment cycles with fewer manual approvals.
  • Centralized permission control under AWS IAM and TeamCity service accounts.
  • Reduced human error with automatic rollback and audit logs intact.
  • Easier onboarding since new developers inherit full pipeline logic instead of shell scripts.

The daily developer experience improves dramatically. Instead of juggling YAML fragments and AWS consoles, you trigger a build, review output, and trust it. Fewer manual pushes. Fewer policy debates. Higher velocity and a pipeline that actually reflects reality instead of Friday-night improvisation.

Platforms like hoop.dev turn those access rules into guardrails that enforce policy automatically. With identity-aware gateways and context-based permissions, you can grant TeamCity agents temporary, scoped access to AWS resources while staying within compliance boundaries like SOC 2 or ISO 27001.

How do I connect CloudFormation and TeamCity quickly?
Use AWS IAM roles with OIDC federation. Configure TeamCity agents to authenticate using that provider, then define stack operations under the assumed role. This setup removes the need for static AWS keys and cuts credential leaks down to zero.

Once everything works, notice the quiet: fewer alerts, faster runs, cleaner logs. CloudFormation and TeamCity finally cooperate instead of compete.

See an Environment Agnostic Identity-Aware Proxy in action with hoop.dev. Deploy it, connect your identity provider, and watch it protect your endpoints everywhere—live in minutes.

Get started

See hoop.dev in action

One gateway for every database, container, and AI agent. Deploy in minutes.

Get a demoMore posts