AWS AmazonElastiCache: ElastiCache VPC access: transit gateway, peering, security groups
Summary
Adds guidance on connecting a cache to an application in another VPC via a transit gateway, including updating route tables and modifying the cache's security group to allow inbound TCP traffic from the application's security group or IP range; also adds inter-Region VPC peering and transit VPC options and fixes Region capitalization.
Security assessment
The added text documents network access controls for reaching an ElastiCache cluster across VPCs, explicitly instructing readers to scope inbound TCP access via security groups (source security group or IP range) and to use private connectivity options such as VPC peering/transit gateway. This is security-relevant network hardening guidance rather than a fix for a specific vulnerability, so medium severity.
Evidence
You must also allow the application to reach the cache. Modify the security group of the cache to allow inbound TCP traffic from the security group or IP address range of the application. Use the port that the cache uses.
Diff
diff --git a/AmazonElastiCache/latest/dg/elasticache-vpc-accessing.md b/AmazonElastiCache/latest/dg/elasticache-vpc-accessing.md index 2e5967bfc..218e3b463 100644 --- a//AmazonElastiCache/latest/dg/elasticache-vpc-accessing.md +++ b//AmazonElastiCache/latest/dg/elasticache-vpc-accessing.md @@ -90 +90 @@ The default port for Valkey and Redis OSS caches and replication groups is `6379 -When your cache is in a different VPC from the EC2 instance you are using to access it, there are several ways to access the cache. If the cache and EC2 instance are in different VPCs but in the same region, you can use VPC peering. If the cache and the EC2 instance are in different regions, you can create VPN connectivity between regions. +When your cache is in a different VPC from the EC2 instance you are using to access it, there are several ways to access the cache. If the cache and EC2 instance are in different VPCs but in the same Region, you can use VPC peering. If the cache and the EC2 instance are in different Regions, you can use inter-Region VPC peering or create VPN connectivity between Regions. @@ -140 +140,3 @@ A transit gateway enables you to attach VPCs and VPN connections in the same AWS -You can enable multicast on a transit gateway, and then create a transit gateway multicast domain that allows multicast traffic to be sent from your multicast source to multicast group members over VPC attachments that you associate with the domain. +You can also use a transit gateway to connect a cache to an application in a different Amazon VPC. Attach the Amazon VPC that contains the cache and the Amazon VPC that contains the application to the same transit gateway. Then update the route tables of both VPCs to route traffic between them. + +You must also allow the application to reach the cache. Modify the security group of the cache to allow inbound TCP traffic from the security group or IP address range of the application. Use the port that the cache uses. @@ -147,0 +150,4 @@ For more information, see [Transit gateways](https://docs.aws.amazon.com/vpc/lat +If your cache and Amazon EC2 instance are in different Regions, you can connect them by using an inter-Region Amazon VPC peering connection. Resources in VPCs in different AWS Regions can then communicate using private IP addresses, without a gateway, VPN connection, or separate network appliance. Inter-Region Amazon VPC peering is available in all commercial AWS Regions. For more information, see the [Amazon VPC Peering Guide](https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html). + +Alternatively, you can use a transit VPC, as described in the following section. +