<!-- 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()
```
expected_result['Version'] = '1'
            expected_result['State'] = 'Active'
            expected_result['LastUpdateStatus'] = 'Successful'
            expected_result['PackageType'] = None
            expected_result2 = dict(expected_result)
            expected_result2['FunctionArn'] = str(lambda_api.func_arn(self.FUNCTION_NAME)) + ':2'
            expected_result2['Version'] = '2'
            self.assertDictEqual(expected_result, result)
            self.assertDictEqual(expected_result2, result2)
    def test_publish_non_existant_function_version_returns_error(self):
        with self.app.test_request_context():
            result = json.loads(lambda_api.publish_version(self.FUNCTION_NAME).get_data())
            self.assertEqual(self.RESOURCENOTFOUND_EXCEPTION, result['__type'])
            self.assertEqual(self.RESOURCENOTFOUND_MESSAGE % lambda_api.func_arn(self.FUNCTION_NAME),
                             result['message'])
    def test_list_function_versions(self):
        with self.app.test_request_context():
            self._create_function(self.FUNCTION_NAME)
            lambda_api.publish_version(self.FUNCTION_NAME)
            lambda_api.publish_version(self.FUNCTION_NAME)
            result = json.loads(lambda_api.list_versions(self.FUNCTION_NAME).get_data())
            for version in result['Versions']:
                
                version.pop('RevisionId', None)
            latest_version = dict()
            latest_version['CodeSize'] = self.CODE_SIZE
            latest_version['CodeSha256'] = self.CODE_SHA_256
            latest_version['FunctionArn'] = str(lambda_api.func_arn(self.FUNCTION_NAME)) + ':$LATEST'
            latest_version['FunctionName'] = str(self.FUNCTION_NAME)
            latest_version['Handler'] = str(self.HANDLER)