def create_application_config()

in setup/fleetLauncherApp/fleetLauncherLambda/app.py [0:0]


def create_application_config(input_params, is_server, server_ip): 
  
  if (is_server):
      port_mappings = SIM_SERVER_PORT_MAPPINGS
  else:
      port_mappings = []

  to_set_params = {
    "application": app_arn,
    "applicationVersion": "$LATEST",
    "launchConfig": {
      "environmentVariables": input_params['environmentVariables'],
      "launchFile": input_params['launchFile'],
      "packageName": input_params['packageName'],
      "portForwardingConfig" : { 'portMappings': port_mappings },
      "streamUI": DEFAULT_STREAM_UI
    }
  }

  to_set_params['launchConfig']['environmentVariables']['ROBOT_NAME'] = input_params['name']

  if (is_server):
    to_set_params['launchConfig']['environmentVariables']['ROSBRIDGE_STATE'] = "SERVER"
    to_set_params['launchConfig']['environmentVariables']['ROSBRIDGE_IP'] = "localhost"
  elif (server_ip):
    to_set_params['launchConfig']['environmentVariables']['ROSBRIDGE_STATE'] =  "CLIENT"
    to_set_params['launchConfig']['environmentVariables']['ROSBRIDGE_IP'] = server_ip

  return to_set_params