There is nothing fun about waiting for a cloud admin to approve your SSH key when all you need is to deploy a fix. The lag between pipelines, credentials, and servers can feel like molasses. That is why getting Azure DevOps to work cleanly with EC2 Systems Manager changes the game.
Azure DevOps orchestrates build and release pipelines across hybrid stacks. EC2 Systems Manager (SSM) handles remote operations on AWS instances without inbound ports or SSH keys. When paired, the two let you deploy, patch, or roll back to EC2 with the same identity context used in your repo. No out-of-band secrets, no “who ran that script?” confusion.
The core idea is simple. Azure DevOps executes jobs under a managed identity linked by OIDC. AWS trusts that identity via IAM federation and grants least-privilege access to SSM. Once configured, each pipeline step that calls SSM runs as that ephemeral federated role. It can start or stop instances, run commands, or fetch parameters, all without credentials stored in the repo.
To wire this up, start in AWS IAM. Create an identity provider that trusts Azure DevOps' OIDC endpoint, then define a role tied to that provider. Scope its permissions to SSM actions only. In Azure DevOps, configure a service connection that issues the federated token at runtime. Your YAML pipeline can then invoke SSM automation documents or send a RunCommand to specific EC2 instances. The trust chain is short, audit-friendly, and automatic.
A few best practices keep this setup clean.
- Rotate trust policies as you would any key, at least quarterly.
- Use parameter store for configuration data instead of static variables.
- Grant instance-level permissions, never the full
AmazonSSMFullAccess. - Log SSM sessions to CloudWatch for SOC 2 or ISO 27001 traceability.
Configured this way, Azure DevOps EC2 Systems Manager becomes a controlled bridge between your CI/CD and your runtime fleet. It enforces identity-based access instead of static credentials. It shortens downtime when debugging since any authorized engineer can trace or rerun the same SSM document that deployed the code.
Here is the short answer if you just want the gist: link Azure DevOps’ OIDC identity to AWS IAM, assign minimal SSM permissions, and invoke Systems Manager commands from your pipeline jobs. That single trust relationship replaces every secret and SSH exception you used to manage.