You just pushed a config for a new environment, expecting Crossplane to spin up a fresh EC2 instance. Instead, you’re watching clouds form in your coffee while waiting for permissions to align and credentials to cooperate. The promise of declarative infrastructure starts fading the moment someone has to “just fix it manually.”
Crossplane EC2 Instances are supposed to end that cycle. Crossplane lets you provision and manage AWS resources with Kubernetes-style manifests. EC2 handles the compute layer that runs nearly everything from staging workloads to internal tools. Together they should make infrastructure reproducible, reviewable, and less fragile. Yet mistakes often come from drifting credentials, mismatched IAM roles, and unclear ownership.
The integration logic is simple at heart. You define an EC2 instance as a Crossplane CompositeResource. Crossplane’s provider for AWS translates those high-level specs into real API calls to AWS, authenticated through a managed identity or service account. No local credentials. No side-channel IAM policies. Every instance declared in YAML becomes traceable in Git and auditable by design.
The workflow usually follows this pattern:
- Configure a provider with AWS credentials mapped through IAM roles.
- Define an EC2 resource class with required parameters: region, instance type, security groups.
- Reference that class from application-specific compositions.
- Crossplane reconciles continuously, keeping EC2 aligned with your manifests.
The real trick is minimizing state drift. Always store definitions in one repo, use short-lived credentials, and apply least-privilege roles. Map your updates to Git commits so you can trace when a VM changed and why. Rotate your Crossplane provider keys like any other secret; OIDC or STS tokens make that painless.