Check ID:
Provider: AWS
Service:
Severity: MEDIUM
Categories:
Resource type:
ec2_instance_profile_attachedProvider: AWS
Service:
ec2Severity: MEDIUM
Categories:
identity-accessResource type:
AwsEc2InstanceWhat this check verifies
EC2 instances are evaluated for association with an IAM instance profile role that delivers temporary credentials to workloads running on the instanceRisk
Without an instance profile, apps often rely on long-term access keys on the host. Exposed keys can be used from anywhere to read data, alter resources, or disrupt services, impacting confidentiality, integrity, and availability. Keys may persist in AMIs, images, or logs, hindering rotation and amplifying blast radius.Recommendation
Attach an IAM instance profile to every instance and grant only permissions each workload requires (least privilege). Eliminate static keys on hosts; use temporary credentials with automatic rotation. Separate roles per application, enforce separation of duties, and limit who can assign roles (govern viaiam:PassRole). Monitor role usage for anomalies.
Remediation
- CLI
- Terraform
- Native IaC
- Dashboard steps
References
- http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2.html
- https://www.trendmicro.com/trendaivisiononecloudriskmanagement/knowledge-base/aws/EC2/ec2-instance-using-iam-roles.html
Where this check fires
This check runs on every scheduled scan against your AWS account. Findings appear at Cloud Security → Findings filterable byCheck ID = ec2_instance_profile_attached. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to AWS checks