Triage and Remediation
Check Cause
Using Console
Using Console
- Sign in to the AWS Management Console.
- Navigate to the AppSync service. You can find this by typing ‘AppSync’ into the search bar at the top of the console.
- In the AppSync dashboard, select the APIs from the navigation pane.
- For each API, click on its name to open its details page. In the details page, click on ‘Settings’ in the left-hand navigation pane.
- In the Settings page, look for the ‘Cache’ section. If the ‘Encryption at Rest’ field is set to ‘Disabled’, then Encryption at Rest is not enabled for the App Sync Cache.
Using CLI
Using CLI
- First, you need to install and configure AWS CLI on your local machine. You can do this by following the instructions provided by AWS. Make sure you have the necessary permissions to access the AppSync resources.
-
Once the AWS CLI is set up, you can use the following command to list all the AppSync APIs in your account:
Replace ‘your-region’ with the region where your resources are located. This command will return a list of all the AppSync APIs in the specified region.
-
To check the encryption at rest configuration for each API, you can use the following command:
Replace ‘your-api-id’ with the ID of the API you want to check and ‘your-region’ with the region where the API is located. This command will return the details of the specified API, including the encryption at rest configuration.
- To check if encryption at rest is enabled, you need to look at the ‘userPoolConfig’ field in the output. If the ‘awsCognitoUserPools’ field is set to ‘true’, then encryption at rest is enabled. If it’s set to ‘false’ or not present, then encryption at rest is not enabled. Note: The ‘awsCognitoUserPools’ field might not be present if the API is not using AWS Cognito User Pools for authorization. In this case, you need to check the ‘authorizationConfig’ field to see if encryption at rest is enabled.
Using Python
Using Python
To check if Encryption At Rest is enabled for App Sync Cache in AWS App Sync, you can use the AWS SDK for Python (Boto3). Here are the steps:
-
Set up AWS SDK for Python (Boto3):
First, you need to install and configure Boto3. You can install it using pip:
Then, configure your AWS credentials. You can do this by setting the following environment variables:
-
Import Boto3 and Initialize AppSync Client:
Now, you can import Boto3 in your Python script and initialize the AppSync client.
-
List AppSync APIs and Check Encryption Configuration:
You can use the
list_graphql_apis
method to get a list of all AppSync APIs. Then, for each API, you can check thexrayEnabled
attribute in thelogConfig
field to see if Encryption At Rest is enabled. -
Handle Pagination:
The
list_graphql_apis
method returns a maximum of 25 APIs at a time. If you have more than 25 APIs, you need to handle pagination by using thenextToken
parameter.