Check provider logo

User data for EC2 instances must not contain sensitive AWS keys

AWS-0029

Severitycritical
Serviceaws/ec2
by Prowler

EC2 instance data is used to pass start up information into the EC2 instance. This userdata must not contain access key credentials. Instead use an IAM Instance Profile assigned to the instance to grant access to other AWS Services.

Risk

No content available

Run this check with Prowler CLI

prowler iac

Recommendation

Remove sensitive data from the EC2 instance user-data

Remediation

Native IaC
Terraform
Other

EC2 instance data is used to pass start up information into the EC2 instance. This userdata must not contain access key credentials. Instead use an IAM Instance Profile assigned to the instance to grant access to other AWS Services.

References