This control checks whether your application uses an API key to interact with an AWS AppSync GraphQL API. The control fails if an AWS AppSync GraphQL API is authenticated with an API key.
Risk
API keys in AppSync can expose applications to unauthorized access if compromised. Avoiding API keys helps reduce the risk of unintended access.
Run this check with Prowler CLI
prowler aws --checks appsync_graphql_api_no_api_key_authentication
ARN template
arn:aws:appsync:{region}:{account-id}:apis/{api-id}
Remediation
aws appsync update-graphql-api --api-id <api-id> --authentication-type <authentication-type>
https://docs.aws.amazon.com/securityhub/latest/userguide/appsync-controls.html#appsync-5
Use authentication methods other than API keys for AWS AppSync GraphQL APIs, such as AWS_IAM or Amazon Cognito.
Source Code
Resource Type
AwsAppSyncGraphQLApi