ElastiCache Without VPC

  • Query id: 5527dcfc-94f9-4bf6-b7d4-1b78850cf41f
  • Query name: ElastiCache Without VPC
  • Platform: Ansible
  • Severity: Low
  • Category: Networking and Firewall
  • CWE: 284
  • URL: Github

Description

ElastiCache should be launched in a Virtual Private Cloud (VPC)
Documentation

Code samples

Code samples with security vulnerabilities

Positive test num. 1 - yaml file
- name: Basic example
  community.aws.elasticache:
    name: "test-please-delete"
    state: present
    engine: memcached
    cache_engine_version: 1.4.14
    node_type: cache.m1.small
    num_nodes: 1
    cache_port: 11211
    cache_security_groups:
      - default
    zone: us-east-1d

Code samples without security vulnerabilities

Negative test num. 1 - yaml file
- name: Basic example2
  community.aws.elasticache:
    name: "test-please-delete"
    state: present
    engine: memcached
    cache_engine_version: 1.4.14
    node_type: cache.m1.small
    num_nodes: 1
    cache_port: 11211
    cache_subnet_group: default
    zone: us-east-1d