This project contains a Godot Engine plugin to interact with AWS Amplify deployed resources on AWS.
Note: “The sample code; software libraries; command line tools; proofs of concept; templates; or other related technology (including any of the foregoing that are provided by our personnel) is provided to you as AWS Content under the AWS Customer Agreement, or the relevant written agreement between you and AWS (whichever applies). You should not use this AWS Content in your production accounts, or on production or other critical data. You are responsible for testing, securing, and optimizing the AWS Content, such as sample code, as appropriate for production grade use based on your specific quality control practices and standards. Deploying AWS Content may incur AWS charges for creating or using AWS chargeable resources, such as running Amazon EC2 instances or using Amazon S3 storage.”
If you need step by step tutorials you can use our quicktstarts or explore labs on the wiki.
Download the plugin
- Go to the GitHub Release Section
- Click on the latest release
- Download the source code
- Extract the plugin code
- Copy the addons/aws-amplify folder at the root of your Godot project
Enable the plugin
- Open Project -> Project Settings -> Plugins -> Enabled (AWS Amplify)
- The plugin autload the
aws_amplifysingleton when enabled
The AWS Amplify Plugin is ready to be used!
The plugin is organized in the same way as the amplify-js client.
The base class AWSAmplify contains several module, each of them implementing specific features.
You can access each module from the base class direcly with the global variable aws_amplify.
This module offers basic features to send http requests to AWS resources.
You can find the source code here.
Here's a list of all the functions with their parameters from the provided AWSAmplifyClient class:
You can send http request and receive responses, with plain text bodies:
get_(endpoint: String, headers: Array, body: String)post(endpoint: String, headers: Array, body: String)put(endpoint: String, headers: Array, body: String)delete(endpoint: String, headers: Array, body: String)send(endpoint: String, headers: Array, method: HTTPClient.Method, body: String)
You can send http request and receive responses, with JSON bodies:
get_json(endpoint: String, headers: Array, json_body: Dictionary)post_json(endpoint: String, headers: Array, json_body: Dictionary)put_json(endpoint: String, headers: Array, json_body: Dictionary)delete_json(endpoint: String, headers: Array, body: Dictionary)send_json(endpoint: String, headers: Array, method: HTTPClient.Method, json_body: Dictionary)
This module is used in other modules such as auth and data.
This module offers authentication features.
You can find the source code here.
sign_up(username, password, options: Dictionary = {})confirm_sign_up(username: String, confirmation_code: String, options: Dictionary = {})resend_sign_up_code(username, options: Dictionary = {})
sign_in(username, password, options: Dictionary = {})reset_password(username, options: Dictionary = {})confirm_reset_password(username, new_password, confirmation_code, options: Dictionary = {})update_password(old_password, new_password, options: Dictionary = {})
sign_out(global: bool = false)refresh_token(refresh_token)
update_user_attributes(user_attributes: Dictionary, options: Dictionary = {})update_user_attribute(user_attribute_name: String, user_attribute_value, options: Dictionary = {})confirm_user_attribute(attribute_name: String, confirmation_code: String, options: Dictionary = {})send_user_attribute_confirmation_code(attribute_name: String, confirmation_code: String, options: Dictionary = {})delete_user_attributes(user_attribute_names: Array[String])
get_token(name)get_user_attribute(name: String, refresh_attributes = false)get_user_attributes(refresh_attributes = false)add_user_attributes(user_attributes: Dictionary)remove_user_attributes(keys: Array)refresh_user(refresh_token = false, refresh_user_attributes = false)
get_(endpoint: String, headers: Array, body: String)post(endpoint: String, headers: Array, body: String)put(endpoint: String, headers: Array, body: String)delete(endpoint: String, headers: Array, body: String)send(endpoint: String, headers: Array, method: HTTPClient.Method, body: String)
get_json(endpoint: String, headers: Array, json_body: Dictionary)post_json(endpoint: String, headers: Array, json_body: Dictionary)put_json(endpoint: String, headers: Array, json_body: Dictionary)delete_json(endpoint: String, headers: Array, body: Dictionary)send_json(endpoint: String, headers: Array, method: HTTPClient.Method, json_body: Dictionary)
This module offers GraphQL features.
You can find the source code here
Here's a list of all the functions defined in the AWSAmplifyData class:
query(operation, operation_name = "MyQuery", authenticated: bool = true)mutation(operation, operation_name = "MyMutation", authenticated: bool = true)subscription(operation, operation_name = "MySubscription", authenticated: bool = true)send(operation, operation_name, method: GraphQLMethod, authenticated: bool = true)
The plugin offers sign-up, sign-in and sign-out forms to handle various user authentication flows.
You can find the source code here
You can find also various samples showing how to use the form here
The wiki contains everything you want to know about getting started with AWS Amplify with the Godot Engine.
If you have a question or you want to discuss with the AWS Amplify for Godot Engine community go to the main project discussions channels.
If you have any issue with a custom build image report a bug and if you need a new image or something else create a feature request.
See CONTRIBUTING for more information.
This library is licensed under the MIT-0 License. See the LICENSE file.
See THIRD_PARTY_LICENSES for more information.