Description
Send AWS Global Accelerator connection records to S3 by enabling flow logs on the accelerator.
Potential impact
Missing records make it harder to identify which endpoint handled a connection.
Remediation
In attributes, set flow_logs_enabled = true and specify an existing S3 bucket and prefix. Allow log delivery in the bucket policy. After traffic passes through the accelerator, check that a log file arrives under that prefix. Delivery can take time.
Examples
Replace example-bucket with your destination bucket. The accelerator itself is enabled in both excerpts.
Before
hcl
resource "aws_globalaccelerator_accelerator" "example" {
name = "Example"
ip_address_type = "IPV4"
enabled = true
}
After
hcl
resource "aws_globalaccelerator_accelerator" "example" {
name = "Example"
ip_address_type = "IPV4"
enabled = true
attributes {
flow_logs_enabled = true
flow_logs_s3_bucket = "example-bucket"
flow_logs_s3_prefix = "flow-logs/"
}
}