IN THIS ARTICLE
Using the Cloud Canvas Command Line
Using the Cloud Canvas Command Line
Cloud Canvas provides the \dev\lmbr_aws.cmd command line tool for working with AWS resources. The tool invokes Python code that is located in the \dev\Tools\lmbr_aws directory.
Notes
- Lumberyard 1.9 renamed some
lmbr_awscommands. For a list of the older commands and their newer equivalents, see Command Reorganization. - For information on using Dynamic Content Cloud Gem
lmbr_awscommands to update dynamic content, see Using the Dynamic Content Command Line. - For information on
lmbr_awscommands for the Cloud Gem Portal and the cloud gem framework, see Using the Cloud Gem Framework Command Line. - For information on
lmbr_awscommands that manage roles and permissions, see Using the Cloud Canvas Command Line to Manage Roles and Permissions.
Syntax
lmbr_aws {command} {command-arguments}
{command} is one of commands in the command summary section that follows. {command-arguments} are the arguments accepted by the command. Arguments common to most commands are listed in the Common Arguments section. Arguments unique to a command are listed in the detail section for the command.
Configuration
The tool gets its default AWS configuration from the same ~/.aws/credentials and ~/.aws/config files as the AWS command line tools \(for information, see [Configuring the AWS Command Line Interface](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html)\). The lmbr_aws tool does not require that the AWS command line interface be installed.
Environment Variables
As with the AWS command line tools, the default AWS configuration can be overridden by using the following environment variables.
AWS_ACCESS_KEY_IDThe access key for your AWS account.AWS_SECRET_ACCESS_KEYThe secret key for your AWS account.AWS_DEFAULT_REGIONThe default region to use; for example,us-east-2.AWS_PROFILEThe default credential and configuration profile to use, if any.
Configuration Arguments
The following arguments can be used to override the AWS configuration from all other sources:
--assume-role{role-name}or-R {role-name}– Specifies the IAM role to assume to perform the requested actions. The credentials in the~/.aws/credentialsfile must be able to assume the specified role.--aws-access-key {access-key}– The AWS access key that is used.--aws-secret-key {secret-key}– The AWS secret key that is used.--profile {profile-name}or-P {profile-name}– The AWS command line tool profile that is used.
Common Arguments
Most of the lmbr_aws commands accept the following arguments, in addition to their own individual arguments:
--aws-directory {aws}– Identifies the{game}\AWSdirectory to use. The default is the value of thesys_game_folderproperty from{root}\bootstrap.cfgwithAWSappended.--game-directory {directory}– Location of the game project directory. The default is{root}\{game}where {game} is determined by thesys_game_foldersetting in the{root}\bootstrap.cfgfile.--helpor-h– Display help for the command.--no-prompt– Suppresses calls that request input from the command prompt window.--region-override {AWS_region}– Specify a non-default AWS region to use in yourlocal-project-settings.jsonfile.--root-directory {root}– Identifies the lumberyard_installation\devdirectory. The default is the current working directory.--user-directory {user}– Location of the user cache directory. The default is{root}\Cache\{game}\AWSwhere {game} is determined by thesys_game_foldersetting in the{root}\bootstrap.cfgfile.--verbose– Shows additional output when executing commands.
Commands
Following are the lmbr_aws commands.
cleanup Command
The lmbr_aws --cleanup command deletes resources that you no longer need from your account in AWS.
Warning
Before you use the cleanup tool, be aware of the following points:
Do not use the cleanup tool if you have a project stack name that begins with an IAM user name that you do not want to delete. Doing so can result in the deletion of the IAM user, its roles, and its profiles.
When you delete an AWS resource, you permanently delete any objects that are stored in that resource. For example, if you delete an S3 bucket, all objects inside the bucket are also deleted.
--cleanup
Note that unlike other lmbr_aws commands, the cleanup command begins like a command argument, with two ‘--’. In the following example, replace {cleanup-command-parameters} with any of the valid cleanup arguments shown in the list that follows.
lmbr_aws --cleanup {cleanup-command-parameters}
In addition to the
Common Arguments, the cleanup command accepts the following arguments:
--aws-access-key {aws-access-key}The AWS access key to use.
--aws-secret-key {aws-secret-key}The AWS secret key to use.
--delete-global-resourcesOptional. If the
--regionargument is specified, deletes global resources such as IAM roles and Amazon S3 buckets. Ignored if--regionis unspecified.--confirm-deletionOptional. Used with the
--delete-global-resourcescommand to confirm you understand that AWS resources will be deleted. Can be useful for automation.--prefix {prefix [prefix...]}Optional. Deletes stacks and Amazon S3 buckets in AWS that have the specified prefixes.
--except {exception [exception...]}Optional. Do not delete resources that start with the specified exceptions. Can be useful, for example, when cleaning up old results while a test in progress.
--profile {profile}Optional. The AWS profile to use. Defaults to the default AWS profile. AWS access and secret key take precedence over profile if set.
--region {region}Optional. The AWS region to use. Defaults to
us-east-1.
For more information on the cleanup tool, see Freeing Up AWS Resources.
cloud-gem Commands
The lmbr_aws cloud-gem commands create, enable, and disable cloud gems.
cloud-gem create
Create a cloud gem. This command is new in Lumberyard 1.11.
In addition to the
Common Arguments, the cloud-gem create command accepts the following arguments:
--directory {path}Optional. The directory where the gem is created. The default is
\dev\Gems\{name}\v{N}, where {name} is the name that was specified by the--gemoption and {N} is the major part of the gem version number as specified by the--versionoption.--enableOptional. Enable the gem for the current project when the gem is created. By default, the gem is not enabled when it is created.
--gem {name}Required. The name of the gem to create.
--initial-content {initial-content-type}Optional. Initialize the cloud gem’s
AWSdirectory with the contents specified by{initial-content-type}.Following are possible values for
{initial-content-type}. Note
Before you can use theapicontent options, do one of the following:
In Lumberyard Setup Assistant, choose Compile the game code From a command prompt window on the\dev\Tools\LmbrSetup\Windirectory, enter the following command:lmbr capabilities enable compilegameapi-lambdaDefine a resource group with Amazon API Gateway and AWS Lambda function resources that conform to the Cloud Gem Framework’s Service API pattern. You can add AWS resources as needed.
api-lambda-bucketDefine a resource group with API Gateway and Lambda function resources that conform to the Cloud Gem Framework’s Service API pattern. Also creates an Amazon S3 bucket resource.
api-lambda-dynamodbDefine a resource group with API Gateway and Lambda function resources that conform to the Cloud Gem Framework’s Service API pattern. Also creates an Amazon DynamoDB table resource.
bucketDefine a resource group that has an Amazon S3 bucket resource.
lambdaDefine a resource group that has a Lambda function resource.
no-resourcesDefine a resource group that has no resources \(except [AccessControl](cloud-canvas-setting-access-permissions.md#cloud-canvas-setting-access-permissions-access-control), which is required\). This is the default value.
resource-manager-pluginDefine a resource manager plugin.
--no-cpp-codeOptional. Define a gem that contains no C++ code and does not build as a
.dllfile. The gem can contain resource group definitions and/or resource manager plugins.--version {version}
Optional. Set the gem version to the number specified by {version}. The default is 1.0.0. The version number must be in the format {number}.{number}.{number}.
cloud-gem disable
Disable a cloud gem that is in the current project. This command is new in Lumberyard 1.11.
In addition to the
Common Arguments, the cloud-gem disable command accepts the following arguments:
--gem {name}Required. The name of the gem to disable.
cloud-gem enable
Enable a cloud gem that is in the current project. This command is new in Lumberyard 1.11.
In addition to the
Common Arguments, the cloud-gem enable command accepts the following arguments:
--gem {name}Required. The name of the gem to enable.
deployment Commands
The lmbr_aws deployment commands manage Cloud Canvas deployments.
Note
In Lumberyard 1.16 and later versions, the deployment commands install, modify, or remove gems in series rather than in parallel. This prevents issues that can occur in AWS when multiple resource groups are created, updated, or deleted at the same time.
This default behavior can be overridden with the --parallel option, as in the following examples:
lmbr_aws deployment create --deployment deployment_name --parallel
lmbr_aws deployment update --parallel
lmbr_aws deployment delete --deployment deployment_name --parallel
Warning
Because it greatly increases the risk of errors when you modify your deployment, use of the --parallel option is not recommended.
deployment create
Create a complete and independent copy of all the resources needed by the Lumberyard project.
In addition to the
Common Arguments, the deployment create command accepts the following arguments:
--deployment {deployment-name}or-d {deployment-name}Required. The name of the deployment to create.
--confirm-aws-usageor-COptional. Confirms that you know that the
deployment createcommand will create AWS resources for which you may be charged and that may perform actions that can affect permissions in your AWS account. Specify this argument to disable the related confirmation prompt.
deployment default
Set or show the default user and project deployments.
In addition to the
Common Arguments, the deployment default command accepts the following arguments:
--set {deployment}Optional. Sets the default to the provided deployment name.
--clearOptional. Clears the defaults.
--showOptional. Shows the defaults.
--projectOptional. Applies
--setand--clearto the project default instead of the user default. Ignored for--show.Only one of the
--set,--clear, and--showarguments is allowed.If
--setor--clearis specified, this command updates the{root}\user\AWS\user-settings.jsonfile. If--projectis provided, the{root}\{game}\AWS\project-settings.jsonfile is updated.
deployment delete
Delete a complete and independent copy of all the resources needed by the Lumberyard project.
In addition to the
Common Arguments, the deployment delete command accepts the following arguments:
--deployment {deployment-name}or-d {deployment-name}Required. The name of the deployment to delete.
--confirm-resource-deletionOptional. Acknowledges that the command will permanently delete the resources for the specified deployment. If this argument is not specified, a confirmation prompt is issued.
Note
AWS CloudFormation cannot delete stacks that define Amazon S3 buckets that contain data. To allow project stacks to be deleted, the project-template.json file specifies a DeletionPolicy of Retain for the configuration bucket. This causes AWS CloudFormation to not delete the bucket when the project stack is deleted. After the project stack has been deleted, the command removes all the objects from the configuration bucket and then deletes the bucket.
deployment list
List all deployments in the local project.
Example output:
Name Status Reason Timestamp Id
----------------- --------------- ---------------------------------------------------------------------------- ----------------- --------------------------------------------------------------------------------------------------------------------------
AnotherDeployment CREATE_PENDING Resource is defined in the local project template but does not exist in AWS.
Development CREATE_COMPLETE 03/04/16 18:43:11 arn:aws:cloudformation:us-east-2:<ACCOUNTID>:stack/foo-hw-Development-ZDLXUB7FKR94/8e6492f0-e248-11e5-8e7e-50d5ca6e60ae
User Default Deployment: (none)
Project Default Deployment: Development
Release Deployment: (none)
deployment list-resources
List all of the resources associated with the project.
In addition to the
Common Arguments, the deployment list-resources command accepts the following arguments:
--deployment {deployment-name}or-d {deployment-name}Optional. The name of the deployment to list resources for. If not specified, lists all the project’s resources.
deployment protect
Marks a deployment as protected and issues a warning when a user \(for example, a game developer, programmer, or tester\) attempts to connected a development game client to live resources. For more information, see Using Protected Deployments .
In addition to the
Common Arguments, the deployment protect command accepts the following arguments:
--set {deployment-name}Optional. Specifies that the deployment is protected.
--clear {deployment-name}Optional. Specifies that the deployment is not protected.
--showOptional. Displays a list of the deployments that are currently protected. Note
To display the protected status of deployments, you can also use either the deployment list or mappings list command.
deployment release
Sets, shows, or removes the release deployment.
In addition to the
Common Arguments, the deployment release command accepts the following arguments:
--set {deployment-name}Required. The name of the deployment to set as the release.
--clearRemoves the release designation from the current release deployment.
--showShows the deployment that is currently configured as the release deployment.
deployment tags
Manages the tags for a deployment. Deployment tags specify resource group overrides for a deployment.
In addition to the
Common Arguments, the deployment tags command accepts the following arguments:
- \[*\{tag\}* \.\.\.\]
Optional. Specifies the tags to add to a deployment. The tags are saved in the
lumberyard_version\dev\project_name\AWS\local-project-settings.jsonfile. --clearOptional. Clears all tags for a deployment.
- \[*\{tag\}* \.\.\.\]
Optional. Specifies the tags to delete from a deployment.
--deployment {deployment-name}or-d {deployment-name}Optional. The name of the deployment.
--listOptional. Lists all the tags for a deployment.
deployment update-access
Sets, shows, or removes the release deployment.
In addition to the
Common Arguments, the deployment update-access command accepts the following arguments:
--confirm-aws-usageor-COptional. Confirms that you know this command creates AWS resources for which you can be charged and that it may perform actions that can affect permissions in your AWS account. Specify this argument to disable the related confirmation prompt.
--confirm-resource-deletionOptional. If the operation will delete resources permanently, confirms your acknowledgement and approval. If this argument is not specified, you are prompted to confirm completion of the operation. Specify this argument to disable the related confirmation prompt.
--confirm-security-changeOptional. Confirms that you know that this command may make security-related changes. Specify this argument to disable the related confirmation prompt.
--deployment {deployment-name}or-d {deployment-name}Optional. The name of the deployment whose access stack is updated. If omitted, the default deployment is updated. Use * to update all deployments.
deployment update, deployment upload, deployment upload-resources
Updates a deployment. deployment upload or deployment upload-resources can be used instead of deployment update.
In addition to the
Common Arguments, the deployment update command accepts the following arguments:
--confirm-aws-usageor-COptional. Confirms that you know this command creates AWS resources for which you can be charged and that it may perform actions that can affect permissions in your AWS account. Specify this argument to disable the related confirmation prompt.
--confirm-resource-deletionOptional. If the operation will delete resources permanently, confirms your acknowledgement and approval. If this argument is not specified, you are prompted to confirm completion of the operation. Specify this argument to disable the related confirmation prompt.
--confirm-security-changeOptional. Confirms that you know that this command may make security-related changes. Specify this argument to disable the related confirmation prompt.
--deployment {deployment-name}or-d {deployment-name}Optional. The name of the deployment to update. If omitted, the default deployment is updated.
function Commands
The lmbr_aws function commands manage folders, CloudWatch logs, and code for Lambda functions.
function create-folder
Recreates the default function folder for a Lambda function resource.
In addition to the
Common Arguments, the function create-folder command accepts the following arguments:
--function {function-name}or-f {function-name}Required. The logical name of a Lambda function resource.
--resource-group {resource-group-name}or-r {resource-group-name}Required. The name of a resource group.
--forceOptional. Skips checks for existence of resource and type of resource. Used when creating folders for functions not yet created.
function get-log
Retrieves data from a CloudWatch Logs log file.
In addition to the
Common Arguments, the function get-log command accepts the following arguments:
--deployment {deployment-name}or-d {deployment-name}Optional. The name of a deployment. If this argument is specified, the
--resource-groupargument must also be specified. If this argument is omitted, then the function must exist in the project stack.--function {function-name}or-f {function-name}Required. The logical name of a Lambda function resource.
--resource-group {resource-group-name}or-r {resource-group-name}Optional. The name of a resource group. If specified, the
--deploymentargument must also be specified.--log-stream-name {log-stream-name}or-l {log-stream-name}Optional. The log stream name or partial log stream name. If omitted, the most recent log stream is shown.
function upload-code
Updates Lambda functions for a deployment or project.
In addition to the
Common Arguments, the function upload-code command accepts the following arguments:
--deployment {deployment-name}or-d {deployment-name}Optional. The name of a deployment to update. If neither this argument nor the
--projectargument is specified, the default deployment is updated. If the--projectargument is specified, the--deploymentargument is ignored.--function {function-name}Optional. The name of the Lambda function to update. If not specified, all Lambda functions in the resource group are updated.
--keepOptional. Keep the generated
.zipfile instead of deleting it after it is uploaded.--projectOptional. Updates the project. Overrides the
--deploymentargument.--resource-group {resource-group-name}or-r {resource-group-name}Optional. The name of a resource group that has the function to update.
login-provider Commands
The lmbr_aws login-provider commands add, remove, and update social network login providers in Amazon Cognito identity pool configuration.
login-provider add
Add a player login provider to the Amazon Cognito identity pool configuration. Login providers allow your game’s players to log in using their social network identity, such as Facebook or using their Amazon identity. For more information, see Controlling Access to Resources.
In addition to the
Common Arguments, the login-provider add command accepts the following arguments:
--provider {provider-name}Required. The name of the provider. The name must be
amazon,googleorfacebook, or, if you are using a generic OpenID provider, a name that you choose.--app-id {application-id}Required. The application id from your login provider \(this is usually different from your client ID\).
--client-id {client-id}Required. The unique application client ID for the login provider.
--client-secret {client-secret}Required. The secret key to use with your login provider.
--redirect-uri {redirect-uri}Required. The redirect URI to use with your login provider.
--provider-uri {provider-uri}Optional. The URI for a generic open ID connect provider. This is only use for generic OpenID providers.
--provider-port {provider-port}Optional. The port your provider listens on for its API. This is only used for generic OpenID providers.
--provider-path {provider-path}Optional. The path portion of your provider’s URI. This is only used for generic OpenID providers.
This command saves its configuration in a
player-access/auth-settings.jsonobject in the project’s configuration bucket so that thePlayerAccessTokenExchangeLambda function can access it. Note
You must runproject uploadafter running this command so that the PlayerAccessIdentityPool configuration is updated to reflect the change.
login-provider remove
Remove a player login provider from the Amazon Cognito identity pool configuration.
In addition to the
Common Arguments, the login-provider remove command accepts the following argument:
--provider {provider-name}Required. The name of the provider.
The
login-provider removecommand saves the configuration in a/player-access/auth-settings.jsonobject in the project’s configuration bucket so that thePlayerAccessTokenExchangeLambda function can access it. Note
You must runlmbr_aws project uploadafter running this command so that the PlayerAccessIdentityPool configuration is updated to reflect the change.
login-provider update
Update a player login provider in the Amazon Cognito identity pool configuration. Login providers allow your game’s players to log in using their social network identity, such as Facebook, or using their Amazon identity. For more information, see Controlling Access to Resources.
In addition to the
Common Arguments, the login-provider update command accepts the following arguments:
--provider {provider-name}Required. The name of the updated provider. The name must be
amazon,googleorfacebook, or, if you are using a generic OpenID provider, the name that you chose when the provider was added.--app-id {application-id}Optional. The application ID from your login provider \(this is usually different from your client ID\).
--client-id {client-id}Optional. The unique application client ID for the login provider.
--client-secret {client-secret}Optional. The secret key to use with your login provider.
--redirect-uri {redirect-uri}Optional. The redirect URI to use with your login provider.
--provider-uri {provider-uri}Optional. The URI for a generic open id connect provider. This argument is used only for generic OpenID providers.
--provider-port {provider-port}Optional. The port the provider listens on for the provider’s API. This argument is used only for generic OpenID providers.
--provider-path {provider-path}Optional. The path portion of the provider’s URI. This argument is used only for generic OpenID providers.
The
login-provider updatecommand saves its configuration in a/player-access/auth-settings.jsonobject in the project’s configuration bucket so that thePlayerAccessTokenExchangeLambda function can access it. Note
You must runlmbr_aws project uploadafter running this command so that the PlayerAccessIdentityPool configuration is updated to reflect the change.
mappings Commands
The lmbr_aws mappings commands manage the mappings of logical to physical resource names in a Cloud Canvas deployment.
mappings list
Show the logical to physical resource name mappings.
Example output:
Name Type Id
--------------------------------------- --------------------------- ----------------------------------------------------------------
HelloWorld.SayHello AWS::Lambda::Function foo-hw-Development-ZDLXUB7FKR94-HelloWo-SayHello-1FADMFNE5M1CO
PlayerAccessIdentityPool Custom::CognitoIdentityPool us-east-2:108f6d6a-f929-4212-9947-a03269b9582e
PlayerLoginIdentityPool Custom::CognitoIdentityPool us-east-2:3020e175-0ddd-4860-8dad-1db57162cbb2
PlayerAccessTokenExchange AWS::Lambda::Function foo-hw-PlayerAccessTokenExchange-1BG6JJ94IZAUV
account_id Configuration <ACCOUNTID>
region Configuration us-east-2
mappings update
Update the friendly name to physical resource ID mappings for the current default deployment or the release deployment.
In addition to the
Common Arguments, the mappings update command accepts the following arguments:
--releaseOptional. Causes the release mappings to be updated. By default, only the mappings used when launching the game from inside the editor are updated.
The command looks in the resource-template.json file for
Metadata.CloudCanvas.PlayerAccessproperties on resource definitions. It then queries AWS CloudFormation for the physical names of those resources in the current default deployment. If the--releaseargument is specified, the release deployment is queried.--deployment {deployment-name}or-d {deployment-name}Optional. Exports client and server mapping files for the specified deployment to the
\dev\project_name\Configdirectory in the format{deployment_name}.player.awsLogicalMappings.jsonand{deployment_name}.server.awsLogicalMappings.json. The{deployment-name}argument is required and is case-sensitive.When you run a game launcher such as the one at
dev\Bin64vcNNN\CloudGemSamplesLauncher.exe, you can use the-cc_override_resource_map {mappings-name}argument to choose the mapping. For more information, see Selecting a Deployment with a PC Launcher.
parameter Commands
The lmbr_aws parameter commands manage parameters for Cloud Canvas deployments and resource groups.
parameter clear
Clears the specified parameter configuration for your project. The project must be initialized \(a project stack must have been created\) before you can clear parameters.
In addition to the
Common Arguments, the parameter clear command accepts the following arguments:
--deployment {deployment-name}or-d {deployment-name}Optional. Clears the parameter value for the specified deployment. {deployment-name} can be *, in which case the parameter value used for all deployments that do not override the value is cleared. If omitted, the parameter value is cleared for all deployments, including *.
--resource-group {resource-group-name}or-r {resource-group-name}Optional. Clears the parameter value for the specified resource-group. {resource-group-name} can be *, in which case the parameter value used for all resource groups that do not override the value is cleared. If omitted, the parameter value is cleared for all resource groups, including *.
--parameter {parameter-name}or-p {parameter-name}Required. The parameter to clear.
parameter list
Lists the parameters currently configured for your project. The project must be initialized \(a project stack must have been created\) before you can list parameters.
In addition to the
Common Arguments, the parameter list command accepts the following arguments:
--deployment {deployment-name}or-d {deployment-name}Required. Limits the list to the specified deployment. {deployment-name} can be *, in which case parameters that apply to all deployments are listed.
--resource-group {resource-group-name}or-r {resource-group-name}Required. Limits the list to the specified resource group. {resource-group-name} can be *, in which case parameters that apply to all resource groups are listed.
--parameter {parameter-name}or-p {parameter-name}Optional. Limits the list to the specified parameter.
parameter set
Sets parameter configuration for your project. The project must be initialized \(a project stack must have been created\) before you can set parameters.
In addition to the
Common Arguments, the parameter set command accepts the following arguments:
--deployment {deployment-name}or-d {deployment-name}Required. Sets the parameter value for the specified deployment. {deployment-name} can be *, in which case the parameter value is used for all deployments that do not override the value.
--resource-group {resource-group-name}or-r {resource-group-name}Required. Sets the parameter value for the specified resource group. {resource-group-name} can be *, in which case the parameter value is used for all resource groups that do not override the value.
--parameter {parameter-name}or-p {parameter-name}Required. Specifies the parameter whose value will be set.
--value {parameter-value}or-v {parameter-value}Required. Specifies the value to set.
profile Commands
The lmbr_aws profile commands manage the AWS profiles that you use for Cloud Canvas.
profile add
Add an AWS profile to the AWS command line tool configuration.
In addition to the
Common Arguments, the profile add command accepts the following arguments:
--aws-access-key{accesskey}Required. The AWS access key associated with the added profile.
--aws-secret-key{secretkey}Required. The AWS secret key associated with the added profile.
--profile {profile-name}or-P {profile-name}Required. The name of the AWS profile to add.
--make-defaultOptional. Make the new profile the default profile.
profile default
Set, clear, or show the default AWS profile. The profile default command modifies the DefaultProfile section of the [user\-settings\.json](cloud-canvas-resource-definitions.md#cloud-canvas-user-settings) file. As of Lumberyard 1.15, the
Cloud Canvas cleanup tool uses this setting to determine the AWS profile to use.
In addition to the
Common Arguments, the profile default command accepts the following arguments:
--set {profile-name}Optional. Set the default profile for the current deployment to the provided AWS profile name.
--clearOptional. Clear the default profile.
--showOptional. Show the default profile.
profile list
List the AWS profiles that have been configured.
profile remove
Remove an AWS profile from the AWS command line configuration.
In addition to the
Common Arguments, the profile remove command accepts the following argument:
--profile {profile-name}or-P {profile-name}Required. The name of the AWS profile to remove.
profile rename
Rename an AWS profile in the AWS command line tool configuration.
In addition to the
Common Arguments, the profile rename command accepts the following arguments:
--old {old-profile-name}Required. The name of the AWS profile to change.
--new {new-profile-name}Required. The new name of the AWS profile.
profile update
Update an AWS profile.
In addition to the
Common Arguments, the profile update command accepts the following arguments:
--aws-access-key{accesskey}Optional. The AWS access key associated with the updated profile. The default is to not change the AWS access key associated with the profile.
--aws-secret-key{secretkey}Optional. The AWS secret key associated with the updated profile. The default is to not change the AWS secret key associated with the profile.
--profile {profilename}or-P {profile-name}Required. The name of the AWS profile to update.
Note
To make an existing profile the default profile, use the
profile default --set {profile-name} command.
project Commands
The lmbr_aws project commands manage Cloud Canvas projects in Lumberyard.
project create
Initialize Cloud Canvas resource management for a Lumberyard project. This includes creating a set of default
Resource Definitions in the dev\game\AWS directory and a AWS CloudFormation stack that contains the resources that the Cloud Canvas resource manager uses to manage your game resources.
In addition to the
Common Arguments, the project create command accepts the following arguments:
--stack-name {stack-name}Optional. The name used for the project’s AWS CloudFormation stack. The default is the name of the {game} directory.
--confirm-aws-usageor-COptional. Confirms that you know this command will create AWS resources for which you may be charged and that it may perform actions that can affect permissions in your AWS account. Specify this argument to disable the related confirmation prompt.
--files-onlyOptional. Writes the default configuration data to the
{game}\AWSdirectory and exits. The directory must be empty or must not exist.--region {region}Required. The AWS region in which the project stack will be created. Note
Theregionargument can be used only with theproject createandresource-importer list-importable-resourcescommands. To manually override the AWS region in otherlmbr_awscommands, use the--region-overrideargument.--admin-rolesOptional. Creates the
ProjectOwnerandProjectAdminroles. The default is to create these roles unless--no-admin-rolesargument is used. For more information about these roles, see Cloud Canvas Built-In Roles and Policies.--no-admin-rolesOptional. Turns off the creation of the
ProjectOwnerandProjectAdminroles. This is recommended unless you have a need for these roles.
How project create Works
The project create command performs the following tasks:
Creates the project’s AWS CloudFormation stack using a bootstrap template that defines only the Configuration Bucket resource.
Uploads the project-template.json file and the zipped up contents of the project-code subdirectory to the Configuration Bucket.
Uses the uploaded
project-template.jsonfile to perform an AWS CloudFormation stack update operation. Theproject-code.zipfile is used to create the Lambda function resources defined by theproject-template.jsonfile.
Note
If the {root}\{game}\AWS directory is empty or does not exist, project create creates the directory if necessary and copies the contents of the dev\Tools\lmbr_aws\AWSResourceManager\default-project-content directory to that directory.
project create fails if a stack with the specified name already exists in the configured AWS account and region. In this case you can use the --stack argument to specify a different name for the project stack.
project create fails if the dev\{game}\AWS\local-project-settings.json file has a non-empty ProjectStackId property. Initially, the ProjectStackId property is not present in the local-project-settings.json file. After the project stack is created in step 1, the ProjectStackId property is written to the file and is the project’s AWS CloudFormation stack ID .
If the stack update process in step 2 fails on the first attempt, you can retry by using the project upload command.
project create-extension-template
Creates an extension template for adding project, deployment, or deployment access resources that complement the existing project-template.json, deployment-template.json, or deployment-access-template.json files.
In addition to the
Common Arguments, the project create-extension-template command accepts the following arguments:
--projectOptional. Creates a
project-template-extensions.jsonfile in the project directory.--deploymentOptional. Creates a
deployment-template-extensions.jsonfile in the project directory.--deployment-accessOptional. Creates a
deployment-access-template-extensions.jsonfile in the project directory.
project delete
Delete the AWS CloudFormation stack that contains your project’s resources. You must delete all of the project’s deployments before deleting the project stack. After deleting the project stack, you must create a new project stack before you can use AWS CloudFormation resource manager for your project.
In addition to the
Common Arguments, the project delete command accepts the following argument:
--confirm-resource-deletionOptional. Confirms your acknowledgement and approval that the operation will delete resources permanently. If this argument is not specified, you will be prompted to confirm completion of the operation. Specify this argument to disable the related confirmation prompt.
AWS CloudFormation cannot delete stacks that define Amazon S3 buckets that contain data. To allow project stacks to be deleted, the
project-template.jsonfile specifies aDeletionPolicyofRetainfor the configuration bucket. This causes AWS CloudFormation to not delete the bucket when the project stack is deleted. After the project stack has been deleted, the command removes all the objects from the configuration bucket and then deletes the bucket.
Note
Before you use the project delete command, ensure that the default AWS credentials specified by the ~/.aws/credentials file on the local file system are the same as the credentials that are specified in the Cloud Canvas Credentials Manager. If the credentials are not the same, the project might not delete properly. You can use the
Cloud Canvas Cleanup Tool to remove orphaned resources after a failed project stack deletion.
project list-resources
List all of the resources associated with the project.
project update, project upload
Update the project’s AWS CloudFormation stack. project upload can be used instead of project update.
In addition to the
Common Arguments, the project update command accepts the following arguments:
--confirm-aws-usageor-COptional. Confirms that you know this command will create AWS resources for which you may be charged and that it may perform actions that can affect permission in your AWS account. Specify this argument to disable the related confirmation prompt.
--confirm-resource-deletionOptional. If the operation will delete resources permanently, confirms your acknowledgement and approval. If this argument is not specified, you are prompted to confirm completion of the operation. Specify this argument to disable the related confirmation prompt.
How project update works
The project update command performs the following tasks:
Uploads the project-template.json file and the zipped up contents of the project-code subdirectory to the Configuration Bucket.
Uses the uploaded
project-template.jsonfile to perform an AWS CloudFormation stack update operation. Theproject-code.zipfile is used to create the Lambda function resources defined by theproject-template.jsonfile.
Note
The project update command fails if the dev\{game}\AWS\local-project-settings.json file does not exist or does not have a valid ProjectStackId property.
project update-framework-version
Updates the Cloud Gem framework version for a project.
In addition to the
Common Arguments, the project update-code command accepts the following arguments:
--confirm-aws-usageor-COptional. Confirms that you know that the
deployment createcommand will create AWS resources for which you may be charged and that may perform actions that can affect permissions in your AWS account. Specify this argument to disable the related confirmation prompt.--confirm-resource-deletionOptional. Acknowledges that the command will permanently delete the resources belonging to the specified deployment. If this argument is not specified, a confirmation prompt is issued.
--confirm-security-changeOptional. Confirms that you know that this command may make security-related changes. Specify this argument to disable the related confirmation prompt.
For more information, see Applying Framework Updates to a Project.
resource-group Commands
The lmbr_aws resource-group commands manage the resource groups in your Cloud Canvas project.
resource-group add
Note
The functionality of this command has changed in Lumberyard 1.11. This command is deprecated in favor of the
resource-group enable and
cloud-gem create commands. As of Lumberyard 1.11, project local resource groups are deprecated in favor of cloud gems. Because cloud gems are reusable, we recommend that you use them instead of local resource groups.
As of Lumberyard 1.11, the resource-group add command has the following behavior:
- If the resource group specified in the
--resource-groupparameter exists but is disabled, the resource group is enabled. This is the equivalent of thelmbr_aws resource-group enablecommand. - If the resource group does not exist, the
lmbr_aws cloud-gem createcommand is called to create a new resource group in a cloud gem. The name of the cloud gem is specified by the--resource-group {resource-group-name}parameter.- By default, the new gem has no resources. This corresponds to the
cloud-gem createcommand’s--initial-content no-resourcesoption. - If the
--include-example-resourcesoption is specified, the equivalent of thecloud-gem createcommand’s--initial-content api-lambda-dynamodboption is called.
- By default, the new gem has no resources. This corresponds to the
In addition to the
Common Arguments, the resource-group add command accepts the following arguments:
--resource-group {resource-group-name}or-r {resource-group-name}Required. The name of an existing resource group to enable. If no resource group with the specified name exists, specifies the name of the cloud gem and resource group to be created.
--gem {gem-path}Optional. Looks for the resource group definition at
Gems\group\AWSorgem-path\AWS.--include-example-resourcesOptional. The equivalent of the
--initial-content api-lambda-dynamodboption of the cloud-gem create command.
resource-group disable
Disable a resource group for debugging. This command is new in Lumberyard 1.11.
In addition to the
Common Arguments, the resource-group disable command accepts the following argument:
--resource-group {resource-group-name}or-r {resource-group-name}Required. The name of the resource group to disable.
By default, when a cloud gem is enabled for a project, all its resource groups are enabled. Disabling a resource group has the following consequences:
- When a deployment is created, the resources that the disabled resource group defines are not created in AWS.
- When a deployment is updated, the resources that were defined by the disabled resource group are removed.
- The resource group is added to a list of disabled resource groups in the project’s
local-project-settings.jsonfile.
Note
Prior to Lumberyard 1.11, the local-project-settings.json file kept a list of enabled resource groups. By default, all of a cloud gem’s resource groups are enabled when the cloud gem is enabled. Therefore, listing only the disabled resource groups makes it easier to identify them.
Usually it is better to disable the cloud gem that provides a resource group than to disable the resource group itself. Therefore, we recommend that you use the resource-group disable command only for debugging or testing. To reenable a resource group, you can use the lmbr_aws resource-group enable command.
resource-group enable
Enable a resource group. This command is new in Lumberyard 1.11.
In addition to the
Common Arguments, the resource-group disable command accepts the following argument:
--resource-group {resource-group-name}or-r {resource-group-name}Required. The name of the resource group to enable.
resource-group list
List all the resource groups found in the local deployment template and in the selected deployment in AWS.
In addition to the
Common Arguments, the resource-group list command accepts the following argument:
--deployment {deployment-name}or-d {deployment-name}Optional. The name of the deployment to list resource groups for. If not given, the default deployment is used.
Example output:
Name Status Reason Timestamp Id
-------------- --------------- ------------------------------------------------------------------------------- ----------------- --------------------------------------------------------------------------------------------------------------------------------------------------
AnotherResourceGroup CREATE_PENDING Resource is defined in the local deployment template but does not exist in AWS.
HelloWorld CREATE_COMPLETE 03/04/16 18:42:57 arn:aws:cloudformation:us-east-2:<ACCOUNTID>:stack/foo-hw-Development-ZDLXUB7FKR94-HelloWorld-WSGZ15EUWX52/9b909d20-e238-11e5-a98d-50fae987c09a
resource-group list-resources
List all of the resources associated with the project.
In addition to the
Common Arguments, the resource-group list-resources command accepts the following arguments:
--deployment {deployment-name}or-d {deployment-name}Optional. The name of the deployment to list resources for. If not specified, lists all the project’s resources.
--resource-group {resource-group-name}or-r {resource-group-name}Optional. The name of the resource group to list resources for. If specified,
deploymentmust also be specified. If not specified, all deployment or project resources are listed.
resource-group remove
Note
The functionality of this command has changed in Lumberyard 1.11. This command is deprecated in favor of the
cloud-gem disable and
resource-group disable commands.
As of Lumberyard 1.11, the resource-group remove command has the following behavior:
- If the resource group specified in the
--resource-groupparameter is provided by a cloud gem, disables the cloud gem. This is the equivalent of thelmbr_aws cloud-gem disablecommand. - If the resource group is not provided by a cloud gem, disables the resource group. This is the equivalent of the
lmbr_aws resource-group disablecommand.
In addition to the
Common Arguments, the resource-group remove command accepts the following argument:
--resource-group {resource-group-name}or-r {resource-group-name}Required. The name of the resource group or cloud gem to be disabled.
resource-group upload-resources \(upload, update\)
Update a resource group’s AWS CloudFormation stack in a deployment. resource-group upload or resource-group update can be used instead of resource-group upload-resources.
In addition to the
Common Arguments, the resource-group upload command accepts the following arguments:
--confirm-aws-usageor-COptional. Confirms that you know this command will create AWS resources for which you may be charged and that it may perform actions that can affect permissions in your AWS account. Specify this argument to disable the related confirmation prompt.
--confirm-resource-deletionOptional. If the operation will delete resources permanently, confirms your acknowledgement and approval. Specify this argument to disable the related confirmation prompt.
--confirm-security-changeOptional. Confirms that you know that this command may make security-related changes. Specify this argument to disable the related confirmation prompt.
--deployment {deployment-name}or-d {deployment-name}Optional. The name of the deployment to update. If not specified, the default deployment is updated.
--resource-group {resource-group-name}, or-r {resource-group-name}Required. The name of the resource group to update. If not specified, all resource groups in the deployment are updated.
resource-importer Commands
The lmbr_aws resource-importer commands list and import AWS resource definitions to your Cloud Canvas project.
resource-importer import-resource
Import a resource to a resource group.
In addition to the
Common Arguments, the resource-importer import-resource command accepts the following arguments:
--type {dynamodb|s3|lambda|sns|sqs}Optional. The type of the AWS resource to import. Choose from dynamodb, s3, lambda, sns or sqs.
--arn ARNRequired. The ARN of the AWS resource to import.
--resource-name {resource-name}Required. The name of the resource to import.
--resource-group {resource-group-name}or-r {resource-group-name}Required. The name of the resource group to import.
--downloadOptional. If specified, downloads the contents of the Amazon S3 bucket.
resource-importer list-importable-resources
List all supported resources currently existing on AWS.
In addition to the
Common Arguments, the resource-importer list-importable-resources command accepts the following arguments:
--type {dynamodb|s3|lambda|sns|sqs}Required. The type of the AWS resource to list. Choose from dynamodb, s3, lambda, sns or sqs.
--region {region}Optional. The AWS region of the resources. The default value is the region of the project stack, if it exists. Note
Theregionargument can be used only with theresource-importer list-importable-resourcesandproject createcommands. To manually override the AWS region in otherlmbr_awscommands, use the--region-overrideargument.