AppSync graphql API logging should be enabled¶
This control checks whether an AWS AppSync API has field-level logging turned on. The control fails if the field resolver log level is set to None. Unless you provide custom parameter values to indicate that a specific log type should be enabled, Security Hub produces a passed finding if the field resolver log level is either ERROR or ALL.
How to fix¶
Attribute log_config[0].field_log_level of aws_appsync_graphql_api must be non-empty.
Implementation options¶
Choose the option that matches how you manage Terraform. All options satisfy this control.
Option 1: Terraform AWS provider resources¶
If you manage resources directly, configure the relevant Terraform AWS provider resources to meet this control. See docs for the resources involved: aws_appsync_graphql_api.
resource "aws_appsync_graphql_api" "this" {
authentication_type = "AWS_IAM"
log_config {
cloudwatch_logs_role_arn = "arn:aws:iam::123456789012:role/appsync-logging"
field_log_level = "ERROR"
}
name = "pofix-example-api"
}
Which option should I choose?
- Compliance.tf module (recommended): controls enforced by default and mapped to frameworks.
- Open source module (
terraform-aws-modules): compatible by design with compliance.tf. Same variable names for an easy, low-change migration path when you are ready. - Terraform AWS provider resources: manage Terraform resources directly.
Tool mappings¶
Use these identifiers to cross-reference this control across tools, reports, and evidence.
Compliance.tf (CTF) Control:
appsync_graphql_api_field_level_logging_enabledAWS Config Managed Rule:
APPSYNC_LOGGING_ENABLEDCheckov Checks:
CKV_AWS_193,CKV_AWS_194Powerpipe Control:
aws_compliance.control.appsync_graphql_api_field_level_logging_enabled