from typing import Any, Dict from structlog import get_logger from delphi_es_utils.constants import LINKFIRE_INDEX from delphi_es_utils.core.tracing import configure_logging, configure_sentry from delphi_es_utils.scripts.bulk_index import bulk_index LOG = get_logger(__name__) # pylint: disable=unused-argument def lambda_handler(event, context) -> Dict[str, Any]: """Currently hardcoded to run on linkfire-link index""" configure_logging(cache_logger=False) configure_sentry() context = context.__dict__ event = dict(event) LOG.info('Lambda started.', context=context, lambda_event=event) result = bulk_index(LINKFIRE_INDEX, context=context, event=event) return result