For the complete documentation index, see llms.txt. This page is also available as Markdown.
Cortex CloudApplication Security

AWS EC2 Instance IAM Role not enabled misconfiguration detected in code

Rule Details

Cortex AppSec Rule ID

APPSEC2_AWS_41

Category - Subcategory

IAM - Overly Permissive

Provider

AWS

Severity

LOW

Framework

Terraform

Mapped CSPM/KSPM Rule

2f6f7f84-d2c1-4393-b7eb-e61df34e2700

Impact

AWS provides Identity Access Management (IAM) roles to securely access AWS services and resources. The role is an identity with permission policies that define what the identity can and cannot do in AWS. As a best practice, create IAM roles and attach the role to manage EC2 instance permissions securely instead of distributing or sharing keys or passwords

How to Fix

Resource: aws_instance

  • Arguments: iam_instance_profile [source,go]


resource "aws_instance" "pass" { ami = "ami-005e54dee72cc1d00" # us-west-2 instance_type = "t2.micro" iam_instance_profile = "test"

network_interface { network_interface_id = aws_network_interface.foo.id device_index = 0 }

credit_specification { cpu_credits = "unlimited" } }

Last updated

Was this helpful?