AWS Appsync
Use of external data services in AWS will make charges your account. Please make sure to perform the cleanup per the notes at the bottom of the lab.
The following Lab focuses on quick deployment of Amazon AppSync and then walks through the creation of a resource with Retool Resources.
Requirements
To configure Amazon DynamoDB the following is required:
- AWS Account with Administrative user
- Terraform installed and configured for AWS Account
Steps
The following Terraform template available here is used to configure a simple DynamoDB table.
terraform {}
provider "aws" {
profile = "sandbox"
region = "us-west-2"
}
resource "aws_appsync_graphql_api" "example" {
authentication_type = "AWS_IAM"
name = "example"
schema = <<EOF
schema {
query: Query
}
type Query {
test: Int
- Create the file main.tf and place the contents into the file.
- Initialize Terraform in the directory the main.tf.
terraform init
- Plan the Terraform.
terraform plan
- Run the Terraform.
terraform create
- Within Retool Home, select Resources > Create Resource. Specify a name and under Credentials and a base url.
Under Authentication, specify AWS v4, region the appsync instance is running in (e.g., us-west-2), AWS service (appsync), enable Authenticate using the HTTP Authorization header instead of query parameters. In addition provide the AWS Access Key ID and AWS Secret Key ID.
Cleanup of AWS AppSync
The following steps can be used to cleanup the Amazon AppSync instance.
- Delete the Resource in Retool
- Go to Retool Home Page > Resources > (select Resource created previously) > … > Delete.
- Destroy the AppSync instance via Terraform
terraform destroy
...
[Enter y] y