AWS ELB
This plugin collects read-only AWS Elastic Load Balancing v2 evidence and evaluates CCF Rego policy bundles against one normalized input document per ELBv2 resource.
It implements the RunnerV2 gRPC plugin protocol from github.com/compliance-framework/agent.
Component subject templates registered during Init:
aws-elbv2-loadbalanceraws-elbv2-listeneraws-elbv2-target-groupaws-elbv2-target-health
Account and region are labels and input context. They are not standalone subjects.
This page is for operators who run the plugin-aws-elb plugin with the CCF Agent, and for developers who write policies for it. It documents v0.1.3 and is generated from the plugin's README at v0.1.3.
Configuration
The CCF agent passes configuration as flat string fields. Structured values are JSON-encoded strings.
| Key | Default | Description |
|---|---|---|
accounts | [] | JSON array of {account_id, regions[], role_arn, external_id, session_name, tags{}}. Empty means use the configured AWS credential chain. |
default_regions | [] | JSON array used when an account omits regions; falls back to the AWS SDK default region. |
lookback_days | 90 | Positive integer no greater than 90, used for CloudTrail LookupEvents. |
policy_inputs | {} | JSON object exposed to Rego as input.policy_inputs. |
policy_input | {} | Alias for policy_inputs. |
policy_labels | {} | JSON string map merged into generated evidence labels. |
max_concurrency | 4 | Positive integer no greater than 32, used as the worker count for account/region collection. |
api_timeout_seconds | 60 | Positive integer timeout per account/region target. |
tag_batch_size | 20 | Positive integer no greater than 20, used as the ELBv2 DescribeTags resource ARN batch size. |
Example:
{
"accounts": "[{\"account_id\":\"123456789012\",\"regions\":[\"us-east-1\"],\"role_arn\":\"arn:aws:iam::123456789012:role/elbv2-readonly\",\"external_id\":\"ccf\",\"session_name\":\"ccf-elbv2\",\"tags\":{\"environment\":\"prod\"}}]",
"default_regions": "[\"us-east-1\"]",
"lookback_days": "90",
"policy_inputs": "{\"minimum_availability_zones\":2}",
"policy_labels": "{\"team\":\"security\"}"
}
Evidence collected
Coverage
CONFIG evidence includes:
DescribeLoadBalancersDescribeListenersDescribeTargetGroupsDescribeTargetHealthDescribeTagsfor load balancer, listener, and target group tags
DYNAMIC evidence includes CloudTrail LookupEvents for elasticloadbalancing.amazonaws.com, filtered to CreateListener, ModifyListener, DeleteListener, CreateRule, ModifyRule, and DeleteRule, and attached to matching load balancer records as dynamic.cloudtrail_events.
Out of scope:
- ACM certificate expiry and renewal status. This plugin does not call
acm.DescribeCertificate; it only records the listenercertificate_arn. - SSL policy cipher inspection. This plugin records only the listener
ssl_policystring. - AWS Artifact SOC reports and privacy endpoint inventory.
Policy input
The plugin evaluates four kinds of resource, and a policy receives one document of the matching kind as input. Every document has the same envelope, and resource.type says which kind it is: loadbalancer, listener, target-group or target-health. Only config differs by kind, and a load balancer also carries CloudTrail events under dynamic. A bundle is matched to a kind by its name: plugin-aws-elb-loadbalancer-policies, plugin-aws-elb-listener-policies, plugin-aws-elb-targetgroup-policies or plugin-aws-elb-targethealth-policies. A bundle with any other name is evaluated against load balancers. The tables list the fields of every kind with nested fields in dot notation, and the example shows one document of each kind under the key named after its resource.type; a real input is only the document itself, without that key.
| Field | Type | Description |
|---|---|---|
schema_version | string | All kinds. Always v1. |
source | string | All kinds. Always aws-elbv2. |
account.account_id | string | All kinds. AWS account ID. |
account.role_arn | string | All kinds. ARN of the role the plugin assumed for the account. Omitted when none is configured. |
account.tags | object (string to string) | All kinds. Tags configured on the account in the plugin configuration. Omitted when there are none. |
region.name | string | All kinds. AWS region. |
resource.id | string | All kinds. Resource ID, the part of the ARN after loadbalancer/ or targetgroup/. A listener keeps its full listener/... part. A target health record is <target group ID>/<target ID>. |
resource.arn | string | All kinds. ARN of the resource. A target health record carries the ARN of its target group. |
resource.type | string | All kinds. loadbalancer, listener, target-group or target-health. |
config.load_balancer_arn | string | Load balancer, listener and target group. ARN of the load balancer. For a target group it is the first load balancer attached, or empty. |
config.dns_name | string | Load balancer. DNS name of the load balancer. |
config.scheme | string | Load balancer. internet-facing or internal. |
config.type | string | Load balancer. application, network or gateway. |
config.state | string | Load balancer. State code, such as active. |
config.availability_zones | array of strings | Load balancer. Names of the availability zones. |
config.listener_arn | string | Listener. ARN of the listener. |
config.protocol | string | Listener and target group. Protocol, such as HTTPS or HTTP. |
config.port | integer | Listener and target group. Port. |
config.ssl_policy | string | Listener. Name of the TLS security policy. Empty when the listener has none. |
config.certificate_arn | string | Listener. ARN of the first certificate. Empty when there is none. |
config.target_group_arn | string | Target group and target health. ARN of the target group. |
config.health_check_protocol | string | Target group. Protocol of the health check. |
config.health_check_path | string | Target group. Path of the health check. Empty when it does not apply. |
config.healthy_threshold_count | integer | Target group. Consecutive successes before a target is healthy. |
config.unhealthy_threshold_count | integer | Target group. Consecutive failures before a target is unhealthy. |
config.target_id | string | Target health. ID of the target, such as an instance ID. |
config.target_health_state | string | Target health. Health state, such as healthy or unhealthy. |
dynamic.cloudtrail_events | array of objects | Load balancer. CloudTrail events for the load balancer within the lookback window, each with event_name, event_time and user_identity_arn (strings). dynamic is an empty object on the other kinds. |
tags | object (string to string) | All kinds. ELBv2 tags of the resource. Empty for target health. |
collection.collected_at | string (RFC 3339 time) | All kinds. When the data was collected. |
collection.collector_version | string | All kinds. Always aws-elbv2. |
collection.collection_type | string | All kinds. config_dynamic for a load balancer, config for the others. |
collection.lookback_window | object | Load balancer. start and end (RFC 3339 times) of the CloudTrail lookback. Omitted on the other kinds. |
collection.raw_payload_hashes | object (string to string) | All kinds. primary is a SHA-256 hash of the raw AWS payload, as sha256:.... |
collection.errors | array of objects | All kinds. Collection problems for the resource, each with scope and message (strings). Empty when collection was clean. |
policy_inputs | object | All kinds. The policy_inputs object from the plugin configuration, passed through as is. Empty when none is set. |
An example input:
{
"loadbalancer": {
"schema_version": "v1",
"source": "aws-elbv2",
"account": {
"account_id": "111122223333",
"role_arn": "arn:aws:iam::111122223333:role/ccf-readonly",
"tags": {
"environment": "production"
}
},
"region": {
"name": "eu-west-1"
},
"resource": {
"id": "app/payments-alb/50dc6c495c0c9188",
"arn": "arn:aws:elasticloadbalancing:eu-west-1:111122223333:loadbalancer/app/payments-alb/50dc6c495c0c9188",
"type": "loadbalancer"
},
"config": {
"load_balancer_arn": "arn:aws:elasticloadbalancing:eu-west-1:111122223333:loadbalancer/app/payments-alb/50dc6c495c0c9188",
"dns_name": "payments-alb-1234567890.eu-west-1.elb.amazonaws.com",
"scheme": "internet-facing",
"type": "application",
"state": "active",
"availability_zones": [
"eu-west-1a",
"eu-west-1b"
]
},
"dynamic": {
"cloudtrail_events": [
{
"event_name": "ModifyListener",
"event_time": "2026-11-02T10:00:00Z",
"user_identity_arn": "arn:aws:iam::111122223333:role/platform-admin"
}
]
},
"tags": {
"owner": "platform-team"
},
"collection": {
"collected_at": "2026-11-10T12:00:00Z",
"collector_version": "aws-elbv2",
"collection_type": "config_dynamic",
"lookback_window": {
"start": "2026-08-12T12:00:00Z",
"end": "2026-11-10T12:00:00Z"
},
"raw_payload_hashes": {
"primary": "sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
},
"errors": []
},
"policy_inputs": {
"minimum_availability_zones": 2
}
},
"listener": {
"schema_version": "v1",
"source": "aws-elbv2",
"account": {
"account_id": "111122223333",
"role_arn": "arn:aws:iam::111122223333:role/ccf-readonly",
"tags": {
"environment": "production"
}
},
"region": {
"name": "eu-west-1"
},
"resource": {
"id": "listener/app/payments-alb/50dc6c495c0c9188/f2f7dc8efc522ab2",
"arn": "arn:aws:elasticloadbalancing:eu-west-1:111122223333:listener/app/payments-alb/50dc6c495c0c9188/f2f7dc8efc522ab2",
"type": "listener"
},
"config": {
"listener_arn": "arn:aws:elasticloadbalancing:eu-west-1:111122223333:listener/app/payments-alb/50dc6c495c0c9188/f2f7dc8efc522ab2",
"load_balancer_arn": "arn:aws:elasticloadbalancing:eu-west-1:111122223333:loadbalancer/app/payments-alb/50dc6c495c0c9188",
"protocol": "HTTPS",
"port": 443,
"ssl_policy": "ELBSecurityPolicy-TLS13-1-2-2021-06",
"certificate_arn": "arn:aws:acm:eu-west-1:111122223333:certificate/7c1d2e3f-4a5b-4c6d-8e9f-0a1b2c3d4e5f"
},
"dynamic": {},
"tags": {
"tls": "public"
},
"collection": {
"collected_at": "2026-11-10T12:00:00Z",
"collector_version": "aws-elbv2",
"collection_type": "config",
"raw_payload_hashes": {
"primary": "sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
},
"errors": []
},
"policy_inputs": {
"minimum_availability_zones": 2
}
},
"target-group": {
"schema_version": "v1",
"source": "aws-elbv2",
"account": {
"account_id": "111122223333",
"role_arn": "arn:aws:iam::111122223333:role/ccf-readonly",
"tags": {
"environment": "production"
}
},
"region": {
"name": "eu-west-1"
},
"resource": {
"id": "payments-tg/73e2d6bc24d8a067",
"arn": "arn:aws:elasticloadbalancing:eu-west-1:111122223333:targetgroup/payments-tg/73e2d6bc24d8a067",
"type": "target-group"
},
"config": {
"target_group_arn": "arn:aws:elasticloadbalancing:eu-west-1:111122223333:targetgroup/payments-tg/73e2d6bc24d8a067",
"load_balancer_arn": "arn:aws:elasticloadbalancing:eu-west-1:111122223333:loadbalancer/app/payments-alb/50dc6c495c0c9188",
"protocol": "HTTP",
"port": 8080,
"health_check_protocol": "HTTP",
"health_check_path": "/healthz",
"healthy_threshold_count": 3,
"unhealthy_threshold_count": 2
},
"dynamic": {},
"tags": {
"service": "payments"
},
"collection": {
"collected_at": "2026-11-10T12:00:00Z",
"collector_version": "aws-elbv2",
"collection_type": "config",
"raw_payload_hashes": {
"primary": "sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
},
"errors": []
},
"policy_inputs": {
"minimum_availability_zones": 2
}
},
"target-health": {
"schema_version": "v1",
"source": "aws-elbv2",
"account": {
"account_id": "111122223333",
"role_arn": "arn:aws:iam::111122223333:role/ccf-readonly",
"tags": {
"environment": "production"
}
},
"region": {
"name": "eu-west-1"
},
"resource": {
"id": "payments-tg/73e2d6bc24d8a067/i-0abc123def4567890",
"arn": "arn:aws:elasticloadbalancing:eu-west-1:111122223333:targetgroup/payments-tg/73e2d6bc24d8a067",
"type": "target-health"
},
"config": {
"target_group_arn": "arn:aws:elasticloadbalancing:eu-west-1:111122223333:targetgroup/payments-tg/73e2d6bc24d8a067",
"target_id": "i-0abc123def4567890",
"target_health_state": "healthy"
},
"dynamic": {},
"tags": {},
"collection": {
"collected_at": "2026-11-10T12:00:00Z",
"collector_version": "aws-elbv2",
"collection_type": "config",
"raw_payload_hashes": {
"primary": "sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
},
"errors": []
},
"policy_inputs": {
"minimum_availability_zones": 2
}
}
}
Subject templates
The subject templates this plugin registers. Each example is built from sample data.
aws-elbv2-loadbalancer
A load balancer. Title: ELBv2 load balancer {{ .resource_id }} in {{ .account_id }}/{{ .region }}. The evidence also carries resource_arn and resource_type labels that are not part of the identity.
| Identity key | Description |
|---|---|
account_id | AWS account ID. |
region | AWS region. |
resource_id | Load balancer ID. |
Example:
{
"name": "aws-elbv2-loadbalancer",
"type": "component",
"title": "ELBv2 load balancer app/payments-alb/50dc6c495c0c9188 in 111122223333/eu-west-1",
"description": "Elastic Load Balancing v2 load balancer app/payments-alb/50dc6c495c0c9188.",
"purpose": "Represents an ELBv2 load balancer evaluated for compliance posture.",
"identityLabels": {
"account_id": "111122223333",
"region": "eu-west-1",
"resource_id": "app/payments-alb/50dc6c495c0c9188"
}
}
aws-elbv2-listener
A listener on a load balancer. Title: ELBv2 listener {{ .resource_id }} in {{ .account_id }}/{{ .region }}. The evidence also carries resource_arn and resource_type labels that are not part of the identity.
| Identity key | Description |
|---|---|
account_id | AWS account ID. |
region | AWS region. |
resource_id | Listener resource ID. |
Example:
{
"name": "aws-elbv2-listener",
"type": "component",
"title": "ELBv2 listener listener/app/payments-alb/50dc6c495c0c9188/f2f7dc8efc522ab2 in 111122223333/eu-west-1",
"description": "Elastic Load Balancing v2 listener listener/app/payments-alb/50dc6c495c0c9188/f2f7dc8efc522ab2.",
"purpose": "Represents an ELBv2 listener evaluated for TLS endpoint posture.",
"identityLabels": {
"account_id": "111122223333",
"region": "eu-west-1",
"resource_id": "listener/app/payments-alb/50dc6c495c0c9188/f2f7dc8efc522ab2"
}
}
aws-elbv2-target-group
A target group. Title: ELBv2 target group {{ .resource_id }} in {{ .account_id }}/{{ .region }}. The evidence also carries resource_arn and resource_type labels that are not part of the identity.
| Identity key | Description |
|---|---|
account_id | AWS account ID. |
region | AWS region. |
resource_id | Target group ID. |
Example:
{
"name": "aws-elbv2-target-group",
"type": "component",
"title": "ELBv2 target group payments-tg/73e2d6bc24d8a067 in 111122223333/eu-west-1",
"description": "Elastic Load Balancing v2 target group payments-tg/73e2d6bc24d8a067.",
"purpose": "Represents an ELBv2 target group evaluated for health-check posture.",
"identityLabels": {
"account_id": "111122223333",
"region": "eu-west-1",
"resource_id": "payments-tg/73e2d6bc24d8a067"
}
}
aws-elbv2-target-health
The health of one target in a target group. Title: ELBv2 target health {{ .resource_id }} in {{ .account_id }}/{{ .region }}. The evidence also carries resource_arn and resource_type labels that are not part of the identity.
| Identity key | Description |
|---|---|
account_id | AWS account ID. |
region | AWS region. |
resource_id | Target health ID. |
Example:
{
"name": "aws-elbv2-target-health",
"type": "component",
"title": "ELBv2 target health payments-tg/73e2d6bc24d8a067/i-0abc123def4567890 in 111122223333/eu-west-1",
"description": "Elastic Load Balancing v2 target health payments-tg/73e2d6bc24d8a067/i-0abc123def4567890.",
"purpose": "Represents an ELBv2 target health description evaluated for availability posture.",
"identityLabels": {
"account_id": "111122223333",
"region": "eu-west-1",
"resource_id": "payments-tg/73e2d6bc24d8a067/i-0abc123def4567890"
}
}
Policies
The policy bundles that work with this plugin, at their newest releases. The controls are the ones the bundle's policies list in their metadata.
| Bundle | Latest version | Controls covered | Compatible plugin lines |
|---|---|---|---|
plugin-aws-elb-listener-policies | v0.1.1 | ctrl-cc6-2-014, ctrl-cc6-2-018, ctrl-cc6-3-004, ctrl-cc6-7-001, ctrl-cc6-7-002, ctrl-cc6-7-004, ctrl-cc6-7-005, ctrl-cc6-7-007, ctrl-cc6-7-008, ctrl-cc6-7-009, ctrl-cc6-7-010, ctrl-cc6-7-011 | latest |
plugin-aws-elb-loadbalancer-policies | v0.1.1 | ctrl-a1-1-009, ctrl-a1-2-006, ctrl-a1-2-007, ctrl-cc5-2-005, ctrl-cc6-2-015, ctrl-cc6-2-019, ctrl-cc6-3-013, ctrl-cc6-5-001, ctrl-cc6-7-003, ctrl-cc6-7-006, ctrl-cc6-7-017, ctrl-cc6-7-018 | latest |
plugin-aws-elb-targetgroup-policies | v0.1.1 | ctrl-a1-1-009, ctrl-a1-2-007, ctrl-cc6-7-002, ctrl-cc6-7-005 | latest |
plugin-aws-elb-targethealth-policies | v0.1.1 | ctrl-a1-1-009, ctrl-a1-2-007 | latest |