def get_endpoint_name(self, headers):
        # Headers are case-insensitive. Probably a better way to do this.
        match = headers.get('x-amz-target') or headers.get('X-Amz-Target')
        if match:
            return match.split(".")[1]
Parses request headers and extracts part od the X-Amz-Target
dataset/ETHPy150Open spulec/moto/moto/dynamodb/responses.py/DynamoHandler.get_endpoint_name