The lambda execution is not suspending and the lambda container has no port exposed when running a java 11 lambda with the latest localstack docker image by docker-compose with the environment variable LAMBDA_JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=_debug_port_
    
It works fine for java8 runtime executions.

Docker command:

> localstack_1  | 2020-01-26T12:42:04:INFO:localstack.services.awslambda.lambda_executors: Running lambda cmd: CONTAINER_ID="$(docker create -i   -e ENV="$ENV" -e DOCKER_LAMBDA_USE_STDIN="$DOCKER_LAMBDA_USE_STDIN" -e HOSTNAME="$HOSTNAME" -e LOCALSTACK_HOSTNAME="$LOCALSTACK_HOSTNAME" -e AWS_LAMBDA_FUNCTION_TIMEOUT="$AWS_LAMBDA_FUNCTION_TIMEOUT" -e AWS_LAMBDA_FUNCTION_NAME="$AWS_LAMBDA_FUNCTION_NAME" -e AWS_LAMBDA_FUNCTION_VERSION="$AWS_LAMBDA_FUNCTION_VERSION" -e AWS_LAMBDA_FUNCTION_INVOKED_ARN="$AWS_LAMBDA_FUNCTION_INVOKED_ARN"  --rm "lambci/lambda:java11" "com.XXX.XXX.Handler")";docker cp "/tmp/localstack/zipfile.0c90736c/." "$CONTAINER_ID:/var/task"; docker start -ai "$CONTAINER_ID";

I think this is due to the fact that the classpath arguments and java opts are only being set if the rutime is equal to LAMBDA_RUNTIME_JAVA8 (line 211 of ocalstack/localstack/services/awslambda/lambda_executors.py , commit 03c6f4bf250edd18eb818ed65090f508636b0bff)
arn = func_arn(lambda_name)
        if arn in arn_to_lambda:
            return error_response('Function already exist: %s' %
                lambda_name, 409, error_type='ResourceConflictException')
        arn_to_lambda[arn] = func_details = LambdaFunction(arn)
        func_details.versions = {'$LATEST': {'RevisionId': str(uuid.uuid4())}}
        func_details.last_modified = isoformat_milliseconds(datetime.utcnow()) + '+0000'
        func_details.description = data.get('Description', '')
        func_details.handler = data['Handler']
        func_details.runtime = data['Runtime']
        func_details.envvars = data.get('Environment', {}).get('Variables', {})
        func_details.tags = data.get('Tags', {})
        func_details.timeout = data.get('Timeout', LAMBDA_DEFAULT_TIMEOUT)
        func_details.role = data['Role']
        func_details.memory_size = data.get('MemorySize')
        func_details.code = data['Code']
        func_details.set_dead_letter_config(data)
        result = set_function_code(func_details.code, lambda_name)
        if isinstance(result, Response):
            del arn_to_lambda[arn]
            return result
        
        func_details.code.pop('ZipFile', None)
        
        result.update(format_func_details(func_details))
        if data.get('Publish', False):
            result['Version'] = publish_new_function_version(arn)['Version']
        return jsonify(result or {})
    except Exception as e:
        arn_to_lambda.pop(arn, None)