def __get_container_vars(self, service_name, ctx, ctx_srv):
    container_vars = {}
    container_environment = {'ENV_STAGE': ctx.stage, 'SERVICE_NAME': service_name, 'DEBUG_OUTPUT': ctx.debug_output, 'LS_JAVA_OPTS': '-Xms256m -Xmx{0}m'.format((ctx_srv.size.ram - 256)), 'KINESIS_ENDPOINT': ctx.queue.kinesis_endpoint, 'KINESIS_STREAM_NAME': self.kinesis_stream.stream_name, 'AWS_REGION': ctx.aws_region, 'DYNAMODB_STATE_TABLE_NAME': self.state_table.table_name}
    container_secrets = {}
    if hasattr(ctx_srv, 'variables'):
        for (k, v) in ctx_srv.variables.items():
            container_environment[k.upper()] = v
    if hasattr(ctx_srv, 'secrets'):
        for (k, v) in ctx_srv.secrets.items():
            sm_secret = sm.Secret.from_secret_arn(scope=self, id=f'{k}-secret', secret_arn=v)
            ecs_secret = ecs.Secret.from_secrets_manager(sm_secret)
            secret_env_key = '{0}_SECRET'.format(k.upper())
            container_secrets[secret_env_key] = ecs_secret
    if container_environment:
        container_vars['environment'] = container_environment
    if container_secrets:
        container_vars['secrets'] = container_secrets
    return container_vars
def __get_container_vars(self, service_name, ctx, ctx_srv):
    container_vars = {}
    container_environment = {'ENV_STAGE': ctx.stage, 'SERVICE_NAME': service_name, 'DEBUG_OUTPUT': ctx.debug_output, 'LS_JAVA_OPTS': '-Xms256m -Xmx{0}m'.format((ctx_srv.size.ram - 256)), 'KINESIS_ENDPOINT': ctx.queue.kinesis_endpoint, 'KINESIS_STREAM_NAME': self.kinesis_stream.stream_name, 'AWS_REGION': ctx.aws_region, 'DYNAMODB_STATE_TABLE_NAME': self.state_table.table_name}
    container_secrets = {}
    if hasattr(ctx_srv, 'variables'):
        for (k, v) in ctx_srv.variables.items():
            container_environment[k.upper()] = v
    if hasattr(ctx_srv, 'secrets'):
        for (k, v) in ctx_srv.secrets.items():
            sm_secret = sm.Secret.from_secret_arn(scope=self, id=f'{k}-secret', secret_arn=v)
            ecs_secret = ecs.Secret.from_secrets_manager(sm_secret)
            secret_env_key = '{0}_SECRET'.format(k.upper())
            container_secrets[secret_env_key] = ecs_secret
    if container_environment:
        container_vars['environment'] = container_environment
    if container_secrets:
        container_vars['secrets'] = container_secrets
    return container_vars