<!-- Love localstack? Please consider supporting our collective:
👉  https://opencollective.com/localstack/donate -->

# Type of request: This is a ...

[x] bug report
[ ] feature request

# Detailed description

When using java-aws-sdk `CreateFunctionRequest` and `UpdateFunctionCodeRequest` with `publish` flag set to `true` should publish new version of lambda function. When I tried such operations against localstack container in version `localstack/localstack:0.11.2` those operations didn't publish new function version.

## Expected behavior

`CreateFunctionResponse` nad `UpdateFunctionCodeResponse` when `publish` flag is set to `true` will return under `version` field new version of changed AWS lambda function.

## Actual behavior

Even flag `publish` is set to `true`, above operations responses return in version `$LATEST` value what indicate that operation didn't produce new function version

# Steps to reproduce
- check available versions of given function
- create function or update existing with `publish` flag set to `true`
```
CreateFunctionRequest.builder
      .functionName(functionName)
      .runtime(runtimeName)
      .handler(handlerName)
      .layers(functionLayers)
      .role(lambdaExecutionRole)
      .tags(cdsLambdaTags)
      .memorySize(memorySize)
      .code(functionCode)
      .publish(true)
      .build
//or
UpdateFunctionCodeRequest.builder()
      .functionName(functionName)
      .zipFile(functionCode.zipFile())
      .publish(true)
      .build()
```
- check available versions of given function

## Command used to start LocalStack

Used testcontainers java localstack library.

## Client code (AWS SDK code snippet, or sequence of "awslocal" commands)

```
CreateFunctionRequest.builder
      .functionName(functionName)
      .runtime(runtimeName)
      .handler(handlerName)
      .layers(functionLayers)
      .role(lambdaExecutionRole)
      .tags(cdsLambdaTags)
      .memorySize(memorySize)
      .code(functionCode)
      .publish(true)
      .build
//or
UpdateFunctionCodeRequest.builder()
      .functionName(functionName)
      .zipFile(functionCode.zipFile())
      .publish(true)
      .build()
```
putResponse = self.client.put('{0}/event-source-mappings/{1}'.format(lambda_api.PATH_ROOT,
                        createResult.get('UUID')), data=json.dumps({'Enabled': 'false'}))
        putResult = json.loads(putResponse.get_data())
        self.assertEqual('Disabled', putResult['State'])
        getResponse = self.client.get('{0}/event-source-mappings/{1}'.format(lambda_api.PATH_ROOT,
                        createResult.get('UUID')))
        getResult = json.loads(getResponse.get_data())
        self.assertEqual('Disabled', getResult['State'])
    def test_publish_function_version(self):
        with self.app.test_request_context():
            self._create_function(self.FUNCTION_NAME)
            result = json.loads(lambda_api.publish_version(self.FUNCTION_NAME).get_data())
            result2 = json.loads(lambda_api.publish_version(self.FUNCTION_NAME).get_data())
            result.pop('RevisionId', None)  
            result2.pop('RevisionId', None)  
            expected_result = dict()
            expected_result['CodeSize'] = self.CODE_SIZE
            expected_result['CodeSha256'] = self.CODE_SHA_256
            expected_result['FunctionArn'] = str(lambda_api.func_arn(self.FUNCTION_NAME)) + ':1'
            expected_result['FunctionName'] = str(self.FUNCTION_NAME)
            expected_result['Handler'] = str(self.HANDLER)
            expected_result['Runtime'] = str(self.RUNTIME)
            expected_result['Timeout'] = self.TIMEOUT
            expected_result['Description'] = ''
            expected_result['MemorySize'] = self.MEMORY_SIZE
            expected_result['Role'] = self.ROLE
            expected_result['KMSKeyArn'] = None
            expected_result['VpcConfig'] = None
            expected_result['LastModified'] = self.LAST_MODIFIED
            expected_result['TracingConfig'] = self.TRACING_CONFIG