Running AWS API Jobs Using the Cloud Gem Framework

The Cloud Gem Framework and this documentation are in
preview release and are subject to change.

The Cloud Gem Framework Gem provides C++ classes that can execute any C++ AWS API
call by
using the Lumberyard job execution system. This allows the operation to be performed
on background
threads that are managed by the job system.

We recommend that you put the code that uses AWS in a gem, but this is not required.
If you do use a gem, make the Cloud Gem Framework and Cloud
Canvas Common gems dependencies of your gem by adding the following to your
gem's gem.json file.

In your gem or game project's .wscript file, make the following changes:

To the list of includes, add:

bld.Path('Code/SDKs/AWSNativeSDK/include')

To the list of used static libraries, add CloudGemFrameworkStaticLibrary.

Add AWS_CPP_SDK_CORE and other AWS API dynamic libraries as required. For a
list of available aliases like AWS_CPP_SDK_LAMBDA and other library names,
see the dev\_WAF_\3rd_party\aws_native_sdk_shared.json file.

Add the security libraries for operating systems other than Windows, as in the following
.wscript file for a gem.

Using code similar to the following, run an AWS API job. An alternative approach is
to extend the job class (like LambdaInvokeRequestJob in the example) and provide overrides for the OnSuccess and OnFailure methods.

If your project uses the Cloud Canvas Resource Manager, get the physical
resource ID and the logical resource ID of the AWS resource for each resource group.
These
IDs cause your AWS API call to use the correct resource for the active deployment.
This
ensures that your development, test, and released versions of a game don't interfere
with
each other.

If your project uses the Cloud Canvas Resource Manager, the AWS API is
called using the player's AWS credentials. These credentials are provided by the anonymous
Amazon Cognito Identitypool that Cloud Canvas creates for your project. If you do
not use Cloud Canvas
Resource Manager or want to use other credentials, you can use code like the
following to override the default configuration.