Integrating the Player Account Cloud Gem into an Existing Project
Integrating the Player Account Cloud Gem into an Existing Project
To integrate the Player Account Cloud Gem into an existing project, you must enable the Player Account Cloud Gem, update your deployment stack, and integrate the gem into your game menu.
To integrate the Player Account Cloud Gem into an existing project
Enable the gem. In the Project Configurator, click Cloud Gem Player Account.
Create or update the project stack.
The Player Account Cloud Gem uses an Amazon Cognito user pool. If you created your project using a version of Lumberyard earlier than 1.9, update it by opening a command prompt window in the \dev directory and entering the following command.
lmbr_aws project updateCreate or update the deployment stack. Be sure the
CloudGemPlayerAccountresource group is added to your deployment. If your deployment doesn’t have theCloudGemPlayerAccountresource group, make sure that the Cloud Gem Player Account gem is enabled in the Project Configurator.At a command prompt, enter the following command to update the deployment access stack.
lmbr_aws deployment update-accessThis ensures that the
CloudGemPlayerAccountresource group is correctly linked to thePlayerAccessidentity pool in the deployment access stack.Integrate the gem into your game menu. We recommend that you include the following features:
A global signout – This security feature allows players to invalidate an account’s tokens across all devices if a device has been lost or stolen. The sample level shows how to offer this as a standalone feature. If the previous password was compromised and already used to obtain authentication tokens, you can also have the menu automatically globally sign out after a password change. To implement this functionality, do the following:
Monitor the
CloudGemPlayerAccountNotifications::OnChangePasswordCompleteEBus event.When you receive confirmation that the password change has succeeded, send the following event.
EBUS_EVENT(CloudGemPlayerAccountRequestBus, GlobalSignOut, username)
Email verification – An email verification step ensures that email can be used to recover account access if a password has been forgotten. You can customize the content of the verification emails by using Lambda triggers. To add a new Lambda trigger to the AWS CloudFormation template, use the
LambdaConfigproperty ofPlayerUserPoolin thedev\Gems\CloudGemPlayerAccount\AWS\resource-template.jsonfile. For more information, see Customizing User Pool Workflows by Using AWS Lambda Triggers .