def put_data_mapper_handler(event, context): path_params = event["pathParameters"] body = event["body"] validate_mapper(body) item = { "DataMapperId": path_params["data_mapper_id"], "Columns": body["Columns"], "QueryExecutor": body["QueryExecutor"], "QueryExecutorParameters": body["QueryExecutorParameters"], "CreatedBy": get_user_info(event), "RoleArn": body["RoleArn"], "Format": body.get("Format", "parquet"), "DeleteOldVersions": body.get("DeleteOldVersions", True), "IgnoreObjectNotFoundExceptions": body.get( "IgnoreObjectNotFoundExceptions", False ), } table.put_item(Item=item) return {"statusCode": 201, "body": json.dumps(item)}