<!-- 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()
```
func_details.vpc_config = data.get('VpcConfig', {})
        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.kms_key_arn = data.get('KMSKeyArn')
        func_details.memory_size = data.get('MemorySize')
        func_details.code_signing_config_arn = data.get('CodeSigningConfigArn')
        func_details.code = data['Code']
        
        func_details.package_type = 'Zip'
        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'):
            result['Version'] = publish_new_function_version(arn)['Version']
        return jsonify(result or {})
    except Exception as e:
        ARN_TO_LAMBDA.pop(arn, None)
        if isinstance(e, ClientError):