Infrastructure security in Amazon EC2
As a managed service, Amazon Elastic Compute Cloud is protected by Amazon global network security. For information about Amazon security services and how Amazon protects infrastructure, see Amazon Cloud Security
You use Amazon published API calls to access Amazon EC2 through the network. Clients must support the following:
-
Transport Layer Security (TLS). We require TLS 1.2 and recommend TLS 1.3.
-
Cipher suites with perfect forward secrecy (PFS) such as DHE (Ephemeral Diffie-Hellman) or ECDHE (Elliptic Curve Ephemeral Diffie-Hellman). Most modern systems such as Java 7 and later support these modes.
Additionally, requests must be signed by using an access key ID and a secret access key that is associated with an IAM principal. Or you can use the Amazon Security Token Service (Amazon STS) to generate temporary security credentials to sign requests.
For more information, see Infrastructure Protection in the Security Pillar – Amazon Well-Architected Framework.
Network isolation
A virtual private cloud (VPC) is a virtual network in your own logically isolated area in the Amazon Cloud. Use separate VPCs to isolate infrastructure by workload or organizational entity.
A subnet is a range of IP addresses in a VPC. When you launch an instance, you launch it into a subnet in your VPC. Use subnets to isolate the tiers of your application (for example, web, application, and database) within a single VPC. Use private subnets for your instances if they should not be accessed directly from the internet.
To call the Amazon EC2 API from your VPC using private IP addresses, use Amazon PrivateLink. For more information, see Access Amazon EC2 using an interface VPC endpoint.
Isolation on physical hosts
Different EC2 instances on the same physical host are isolated from each other as though they are on separate physical hosts. The hypervisor isolates CPU and memory, and the instances are provided virtualized disks instead of access to the raw disk devices.
When you stop or terminate an instance, the memory allocated to it is scrubbed (set to zero) by the hypervisor before it is allocated to a new instance, and every block of storage is reset. This ensures that your data is not unintentionally exposed to another instance.
Network MAC addresses are dynamically assigned to instances by the Amazon network infrastructure. IP addresses are either dynamically assigned to instances by the Amazon network infrastructure, or assigned by an EC2 administrator through authenticated API requests. The Amazon network allows instances to send traffic only from the MAC and IP addresses assigned to them. Otherwise, the traffic is dropped.
By default, an instance cannot receive traffic that is not specifically addressed to it. If you need to run network address translation (NAT), routing, or firewall services on your instance, you can disable source/destination checking for the network interface.
Controlling network traffic
Consider the following options for controlling network traffic to your EC2 instances:
-
Restrict access to your instances using security groups. For example, you can allow traffic only from the address ranges for your corporate network.
-
Use private subnets for your instances if they should not be accessed directly from the internet. Use a bastion host or NAT gateway for internet access from an instance in a private subnet.
-
Use Amazon Virtual Private Network or Amazon Direct Connect to establish private connections from your remote networks to your VPCs. For more information, see Network-to-Amazon VPC Connectivity Options.
-
Use VPC Flow Logs to monitor the traffic that reaches your instances.
-
Use GuardDuty Malware Protection to identify suspicious behavior indicative of malicious software on your instances that might compromise your workload, repurpose resources for malicious use, and gain unauthorized access to your data.
-
Use GuardDuty Runtime Monitoring to identify and respond to potential threats to your instances. For more information, see How Runtime Monitoring works with Amazon EC2 instances.
-
Use Amazon Security Hub, Reachability Analyzer, or Network Access Analyzer to check for unintended network accessibility from your instances.
-
Use EC2 Instance Connect to connect to your instances using Secure Shell (SSH) without the need to share and manage SSH keys.
-
Use Amazon Systems Manager Session Manager to access your instances remotely instead of opening inbound SSH ports and managing SSH keys.
-
Use Amazon Systems Manager Run Command to automate common administrative tasks instead of opening inbound SSH ports and managing SSH keys.
Amazon VPC supports additional network security controls, such as gateways, proxy servers, and network monitoring options. For more information, see Control network traffic in the Amazon VPC User Guide.