This documentation is for a prerelease version of O3DE. Click here to switch to the latest release, or select a version from the dropdown.

Version:

Getting Started with AWS Gems

To get started using AWS Gems with AWS services in your O3DE project, complete the following steps.

  1. Create an AWS account if you don’t have one.

  2. Configure AWS credentials following the instructions in Configuring AWS Credentials for O3DE.

    a. Confirm you have credentials using the command aws configure list.

  3. Install the AWS Cloud Development Kit (CDK) .

    a. Confirm the AWS CDK is set up using the command cdk --version.

  4. Build your O3DE project with the AWS Core Gem (and other AWS Gems you need) enabled.

  5. Deploy the AWS CDK applications for the AWS Gems you have enabled. See Deploying the AWS CDK Application for instructions.

  6. Configure a resource mapping file using the Resource Mapping Tool.

  7. Associate the resource mapping file with the project. See the next section entitled Project Settings.

You should now be able to utilize AWS functions in Lua script, Script Canvas, or C++ to communicate with your AWS resources. See Scripting with AWS Core for scripting examples.

Prevent calls to Amazon EC2 Instance Metadata Service

AWS Gems use the AWS C++ SDK to call AWS resources. Unless your project is running on Amazon EC2 compute, it’s recommended that you turn off Amazon EC2 Instance Metadata Service (IMDS) queries by setting the AWS_EC2_METADATA_DISABLED environment variable to true. Setting this environment variable will prevent SDK resources from needlessly attempting to contact the Amazon EC2 IMDS for configuration, region, and credential information, which can result in delays and wasted network resources.

# macOS / Linux
export AWS_EC2_METADATA_DISABLED=true

# Windows (for all sessions)
setx AWS_EC2_METADATA_DISABLED true

# Windows (for just this session)
set AWS_EC2_METADATA_DISABLED=true

Project settings

On start up the AWS Core Gem will look for the awscoreconfiguration.setreg file in the project’s registry directory: <ProjectName>\Registry.

You will need to create this file if you want to set any of the following options. Use the format shown in the example.

SettingDescription
ProfileName[Optional] The project will use your default profile in ./aws/credentials (on macOS and Linux) or %USERPROFILE%\.aws\credentials (on Windows). Override the default profile or any environment variable setting by using this variable. Must be a named profile in your credentials file.
ResourceMappingConfigFileName[Optional] The name of the resource mapping file to load while starting up. Resource mapping files are expected to be located in <ProjectName>\Config. See Resource Mapping Files for more information.
AllowAWSMetadataCredentials[Optional] Whether or not the AWS Core Gem should query AWS environment endpoints like the Amazon EC2 Instance Metadata Service (IMDS) when looking up credentials. Defaults to false. See Running your O3DE project on Amazon EC2 for more information.
Note:
If you make changes to this file, you will need to restart the O3DE Editor.

Example registry settings file:

  {
    "Amazon":
    {
      "AWSCore": {
          "ProfileName": "testprofile",
          "ResourceMappingConfigFileName": "default_aws_resource_mappings.json",
          "AllowAWSMetadataCredentials": false
      }
    }
  }