<!-- 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()
```
'httpMethod': method,
            'queryStringParameters': query_string_params,
            'multiValueQueryStringParameters': multi_value_dict_for_list(query_string_params),
            'requestContext': request_context,
            'stageVariables': get_stage_variables(api_id, stage),
        }
        LOG.debug('Running Lambda function %s from API Gateway invocation: %s %s' % (func_arn, method or 'GET', path))
        return run_lambda(event=event, context=event_context, func_arn=func_arn,
            asynchronous=not config.SYNCHRONOUS_API_GATEWAY_EVENTS)
    except Exception as e:
        LOG.warning('Unable to run Lambda function on API Gateway message: %s %s' % (e, traceback.format_exc()))
def process_sns_notification(func_arn, topic_arn, subscription_arn, message, message_id,
        message_attributes, unsubscribe_url, subject='',):
    event = {
        'Records': [{
            'EventSource': 'localstack:sns',
            'EventVersion': '1.0',
            'EventSubscriptionArn': subscription_arn,
            'Sns': {
                'Type': 'Notification',
                'MessageId': message_id,
                'TopicArn': topic_arn,
                'Subject': subject,
                'Message': message,
                'Timestamp': timestamp_millis(),
                'SignatureVersion': '1',
                
                
                'Signature': 'EXAMPLEpH+..',
                'SigningCertUrl': 'https://sns.us-east-1.amazonaws.com/SimpleNotificationService-000000000.pem',