All posts

How to configure EC2 Systems Manager TeamCity for secure, repeatable access

A build server that leaks credentials is like a coffee pot without a lid—eventually something spills. Many teams still hand hardcoded AWS keys to their CI jobs, then regret it during their next audit. Pairing EC2 Systems Manager (SSM) with TeamCity fixes that by keeping infrastructure secrets out of reach while giving pipelines the access they need. EC2 Systems Manager provides agent-based control and parameter storage for AWS machines. TeamCity orchestrates builds, deployments, and tests acros

Free White Paper

VNC Secure Access + GCP Access Context Manager: The Complete Guide

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

Free. No spam. Unsubscribe anytime.

A build server that leaks credentials is like a coffee pot without a lid—eventually something spills. Many teams still hand hardcoded AWS keys to their CI jobs, then regret it during their next audit. Pairing EC2 Systems Manager (SSM) with TeamCity fixes that by keeping infrastructure secrets out of reach while giving pipelines the access they need.

EC2 Systems Manager provides agent-based control and parameter storage for AWS machines. TeamCity orchestrates builds, deployments, and tests across your environments. Together, they can run secure operations entirely through AWS identity without ever touching plaintext credentials. The result: one less rotating secret, one more predictable pipeline.

Here is the logic behind the integration. Each TeamCity build agent running on EC2 gets an IAM role attached through its instance profile. Systems Manager Session Manager then lets TeamCity orchestrate commands or maintenance tasks through authenticated sessions, logged in CloudTrail. SSM Parameter Store or AWS Secrets Manager feed the build variables on demand. TeamCity fetches them using temporary credentials provided by the role, never storing a password on disk.

If you prefer, consider running your build agents as on-demand EC2 instances accessed through SSM Run Command. That pattern removes SSH keys and centralizes every exec call under AWS audit controls. Your infosec team will sleep better.

Best practices for EC2 Systems Manager TeamCity integration:

Continue reading? Get the full guide.

VNC Secure Access + GCP Access Context Manager: Architecture Patterns & Best Practices

Free. No spam. Unsubscribe anytime.
  • Use IAM roles for service-to-service access instead of long-lived keys.
  • Restrict SSM parameters and commands by tag or path to avoid cross-project leaks.
  • Enable CloudWatch Logs on every SSM invocation to preserve a complete CI audit trail.
  • Rotate and version secrets in Parameter Store automatically using Lambda or EventBridge rules.
  • Limit human access; let TeamCity’s build agents talk to SSM directly.

Want a snippet-friendly answer?
Question: How do I connect EC2 Systems Manager and TeamCity securely?
Answer: Run TeamCity agents on EC2 instances with IAM roles, use SSM Session Manager for command execution, and pull secrets from Parameter Store instead of environment variables.

This setup cuts provisioning steps in half and removes the need to manually inject AWS keys into your build settings. Developers get cleaner logs, faster pipelines, and fewer failed builds due to access errors. The gain in velocity is tangible—you spend less time debugging roles and more time shipping code.

AI tooling also benefits from this model. Copilots and automated agents can perform maintenance tasks only through the same controlled SSM channels, keeping actions traceable and compliant with frameworks like SOC 2.

Platforms like hoop.dev take that further by enforcing identity-based policies in real time. They turn ephemeral permissions and session policies into guardrails that consistently protect even dynamic build clusters. Think of it as policy as code that actually enforces itself.

Benefits at a glance:

  • No plaintext AWS keys in TeamCity.
  • Unified identity through AWS IAM roles.
  • Fully auditable command history in CloudTrail.
  • Simplified rotation and access governance.
  • Faster onboarding for new build agents.

With EC2 Systems Manager TeamCity configured this way, your CI pipelines stay both fast and verifiable. You get security that scales automatically with your infrastructure, not a growing tangle of credentials.

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