Using the Web Communicator CLI - Lumberyard User Guide

Using the Web Communicator CLI

When you enable the Web Communicator Cloud Gem, associated commands become available in the lmbr_aws CLI. You can then use these commands to register and manage client connections, and send messages to those clients.

The following lmbr_aws CLI extension commands are enabled by the Web Communicator Cloud Gem.

web-communicator list-channels

List all existing channels.

The Common Arguments can also be used with this command.

web-communicator list-users

List all existing users.

The Common Arguments can also be used with this command.

web-communicator register-client

Register an OpenSSL or WebSocket client connection. Saves the device cert, port, endpoint, and private keys to the following files in the current or specified folder:

  • webcommunicatorkey.pem

  • webcommunicatordevice.pem

  • deviceInfo.json

These files should be placed in the user storage directory for your application or platform. For example, on a PC, the directory is lumberyard_version\dev\Cache\project_name\pc\user\certs\aws.

In addition to the Common Arguments, this command accepts the following arguments:

  • --type <OPENSSL | WEBSOCKET>

    Type of connection to register.

  • --path <folder_path>

    (Optional) Output folder in which to save the registration files. Defaults to the current directory.

web-communicator send-message

Send a message to all clients on a channel, or to a specific user.

In addition to the Common Arguments, this command accepts the following arguments:

  • --channel-name <channel>

    Channel name on which to send the message.

  • --message <message>

    Message to broadcast. Maximum 1024 characters.

  • --client-id <client_ID>

    (Optional) Amazon Cognito account ID of the client to whom the message should be sent. If this is omitted, the message will be broadcast to all clients on the channel.

web-communicator set-user-status

Set the user status of a client to either "banned" or "registered".

  • --client-id <client_ID>

    Amazon Cognito account ID of the client for which the status should be set.

  • --status <REGISTERED | BANNED>

    Status to set.

web-communicator show-logs

Show recent log events.

In addition to the Common Arguments, this command accepts the following arguments:

  • --minutes <minutes>

    (Optional) Display log events for the specified number of minutes before now. The default is 10 minutes.