Skip to main content

Environment Variables

Last updated on

Your final step will be to fill in the AWS Serverless Application Model Template's environment variables as per the example below:

# The configuration for the runtime environment.
# Required: Yes
Environment:
Variables:
GAME_BASE_URL: ''
GAME_CLIENT_ID: ''
GAME_CLIENT_SECRET: ''
GAME_NAMESPACE: ''
GAME_MODE: ''
IAM_BASE_URL: ''
IAM_CLIENT_ID: ''
IAM_CLIENT_SECRET: ''
DSMC_DEPLOYMENT: ''
REDIS_URL: ''
SESSION_BROWSER_GAME_VERSION: ''
SESSION_BROWSER_MAP_NAME: ''
SESSION_BROWSER_MODE: ''
SESSION_BROWSER_PASSWORD: ''
SESSION_BROWSER_TYPE: ''
SESSION_BROWSER_USERNAME: ''
# Use 'host.docker.internal' when running locally
REDIS_HOST: ''
REDIS_PORT: ''

For more details about environment variables, see the table below.

Environment VariableNotes
GAME_BASE_URLClient Base URL of your Game Client, e.g. if your Game Client is set on demo, the URL will be demo.yourdomain.io.
GAME_CLIENT_IDGame Client ID and Secret of your Game Client as created in the prerequisites.
GAME_CLIENT_SECRET
GAME_NAMESPACERegistered Game Namespace.
GAME_MODEGame mode from the Matchmaking ruleset created in the prerequisites. Used to filter Matchmaking tickets.
IAM_BASE_URLIAM Base URL of your IAM Client, e.g., if your IAM Client is set on demo, the URL will be demo.yourdomain.io/iam.
IAM_CLIENT_IDIAM Client ID and Secret of your IAM Client as created in the prerequisites.
IAM_CLIENT_SECRET
DSMC_DEPLOYMENTFill in the deployment name from your preferred deployment.
REDIS_URLFill with the cluster's primary endpoint.
SESSION_BROWSER_GAME_VERSIONCan be any string to specify the game version in use. These fields have been filled with an example dummy string in this documentation.
SESSION_BROWSER_MAP_NAME
SESSION_BROWSER_MODEGame mode from the Matchmaking ruleset as created in the prerequisites.
SESSION_BROWSER_TYPEFill in with the session browser type that you use. In this case, both Golang and Python use Dedicated Servers for Matchmaking so the type must be specified.
SESSION_BROWSER_USERNAMEIf you restrict your session browser access, then you must specify the username and password combination used. These fields have been filled with an example dummy string in this documentation.
SESSION_BROWSER_PASSWORD
REDIS_HOSTSpecify with the Redis Hostname you set when creating a cluster.
REDIS_PORTSpecify with the Redis Port you set when creating a cluster.