# Steps to reproduce

* Start `localstack` (version 0.10.3).
* Don't create any lambda functions.
* Run:

```sh
AWS_ACCESS_KEY_ID='a' AWS_SECRET_ACCESS_KEY='b' \
aws lambda invoke \
  --function-name 'my-func' \
  --qualifier='qual' \
  --endpoint http://localhost:4574 test.out
```

* Expected behaviour — a `ResourceNotFoundException` from `aws-cli`.
* Actual behaviour — `An error occurred (500) when calling the Invoke operation` message and a 500 response.

This bug only appears if a `qualifier` is included in the request.
""" If LAMBDA_FALLBACK_URL is configured, forward the invocation of this non-existing
        Lambda to the configured URL. """
    if not config.LAMBDA_FALLBACK_URL:
        return None
    if config.LAMBDA_FALLBACK_URL.startswith('dynamodb://'):
        table_name = urlparse(config.LAMBDA_FALLBACK_URL.replace('dynamodb://', 'http://')).netloc
        dynamodb = aws_stack.connect_to_service('dynamodb')
        item = {
            'id': {'S': short_uid()},
            'timestamp': {'N': str(now_utc())},
            'payload': {'S': str(data)}
        }
        aws_stack.create_dynamodb_table(table_name, partition_key='id')
        dynamodb.put_item(TableName=table_name, Item=item)
        return ''
    if re.match(r'^https?://.+', config.LAMBDA_FALLBACK_URL):
        response = safe_requests.post(config.LAMBDA_FALLBACK_URL, data)
        return response.content
    raise ClientError('Unexpected value for LAMBDA_FALLBACK_URL: %s' % config.LAMBDA_FALLBACK_URL)
def not_found_error(ref=None, msg=None):