Skip to content

How do I secure my EC2 instance to meet compliance programs?

5 minute read
0

I want to secure my Amazon Elastic Compute Cloud (Amazon EC2) instance to meet a compliance program.

Resolution

Note: If you receive errors when you run AWS Command Line Interface (AWS CLI) commands, then see Troubleshooting errors for the AWS CLI. Also, make sure that you're using the most recent AWS CLI version.

It's your responsibility to follow compliance laws, regulations, and privacy programs. For more information about existing compliance programs, see AWS Compliance Programs.

The following table includes common compliance programs, their requirements, and AWS services to help you configure compliance:

Compliance programKey requirementsAWS services to use
SOC 2Security, availability, and confidentialityAWS Identity and Access Management (IAM), AWS CloudTrail, AWS Config, Amazon GuardDuty
Health Insurance Portability and Accountability Act (HIPAA)Electronic protected health information (ePHI) encryption, and access logsAWS Key Management Service (AWS KMS), CloudTrail, Amazon Macie
Payment Card Data Security Standards (PCI DSS)Cardholder data protection and web application firewall (WAF)AWS WAF, AWS Shield, Amazon Inspector
General Data Protection Regulation (GDPR)Personally identifiable information (PII) protection, and right to erasureMacie, AWS Lambda
ISO 27001Risk management and encryptionAWS Security Hub, AWS Artifact
National Institute of Standards and Technology (NIST) 800-53Access control and loggingAWS Organizations service control policies (SCPs)
Federal Risk and Authorization Management Program (FedRAMP)US government cloud securityAWS GovCloud (US), AWS Control Tower

To meet compliance requirements, it's a best practice to implement a layered security approach for your EC2 instances.

Use access control to adhere to the principle of least privilege

To configure compliance for programs such as SOC 2, NIST, and ISO 27001, take the following actions:

Set up encryption at rest and in transit

To configure compliance for programs such as HIPPA, PCI DSS, and GDPR, take the following actions:

Set up network security firewalls

To configure compliance for programs such as PCI DSS, FedRAMP, and NIST, take the following actions:

Set up audit trails

To configure compliance for programs such as SOC 2, ISO 27001, and HIPAA, take the following actions:

Configure patch management and vulnerability scans

To configure compliance with programs such as PCI DSS and FedRAMP, take the following actions:

Set up SSH access

To configure compliance with programs such as SOC 2, HIPAA, PCI DSS, and NIST, take the following actions:

Set up threat detection

To configure compliance with programs such as SOC 2 and IS 27001, configure the following GuardDuty settings:

Retrieve information about your instances for a report

To get data about your instance such as ID, tags, and compliance status, run the following describe-instances AWS CLI command:

aws ec2 describe-instances --query Reservations[*].Instances[*].{InstanceId, InstanceType, LaunchTime, State.Name, Tags[?Key==`Name`].Value} --output text > instances.csv

Important: It's a best practice to regularly audit and update your configuration to maintain compliance as standards change.

AWS OFFICIALUpdated 15 days ago