Skip to content

Ensure clusters are behind a VPC

Description

Provision Elasticache Clusters within the AWS VPC platform give it better flexibility and control over the cache clusters security, availability, and traffic routing.

Rationale

The Amazon Virtual Private Cloud (Amazon VPC) service defines a virtual network that closely resembles a traditional data center. When you configure your Amazon VPC you can select its IP address range, create subnets, and configure route tables, network gateways, and security settings. You can also add a cache cluster to the virtual network, and control access to the cache cluster by using Amazon VPC security groups.

Applies To

  • Databases

Tags

This rule is applied when the following tags are present:

Tag With Value
secureclouddb/provider aws
secureclouddb/service elasticache

Default Rule

/**
 * @param {Object} databaseSettings - database settings object
 * @returns {boolean} true if a subnet group name is set
 */
function validate(databaseSettings) {

    const success =
        databaseSettings.awsDatabaseInstance &&
        databaseSettings.awsDatabaseInstance.elasticacheCluster &&
        !!databaseSettings.awsDatabaseInstance.elasticacheCluster.cacheSubnetGroupName

    return {
        success,
    }
}

// invoke
validate(databaseSettings);