Check provider logo

AWS AppSync API has field-level logging set to ALL or ERROR

appsync_field_level_logging_enabled

Severitymedium
Serviceappsync
by Prowler

AWS AppSync GraphQL APIs have field-level logging configured at the resolver level. The check looks for log levels of ERROR or ALL to confirm field resolution events are recorded.

Risk

Without field-level logs, resolver access and mutations lack auditability, reducing detection of data exfiltration and tampering (confidentiality and integrity). Limited traces hinder incident response and root-cause analysis, increasing recovery time.

Run this check with Prowler CLI

prowler aws --checks appsync_field_level_logging_enabled

Recommendation

  • Enable field-level logging at least ERROR; raise to INFO/DEBUG/ALL only for troubleshooting.
  • Enforce least privilege on the logging role.
  • Avoid sensitive data in logs; limit verbose content.
  • Set retention and consider log sampling to balance visibility and cost.

Remediation

CLI

aws appsync update-graphql-api --api-id <example_resource_id> --name <api-name> --authentication-type AWS_IAM --log-config fieldLogLevel=ERROR,cloudWatchLogsRoleArn=<cloudwatch_logs_role_arn>

Native IaC
Terraform
Other
  1. In the AWS Console, go to AppSync and open your GraphQL API
  2. Go to Settings > Logging
  3. Turn on Enable logs
  4. Set Field resolver log level to ERROR (or ALL)
  5. Select an IAM role that allows AppSync to write to CloudWatch Logs
  6. Click Save

Source Code

Resource Type

AwsAppSyncGraphQLApi

References