Skip to content

Commit 7844796

Browse files
authored
feat: Adding DAAC archive config (#396)
* chore: method to subscribe to sns from sqs * feat: adding infrastructure for archive daac * feat: adding percolator * feat: add method to migrate data * feat: add migration logic to the real code * chore: move granules index to correct location * feat: (in progress) adding daac config crud ops * feat: finished adding CRUDS for daac config * fix: need to authorizer if user is authorized for current collection + set tenant & venue for DB * fix: updating errors based on testcase * fix: adding log statement * fix: mistaken perc alias v. normal alias * fix: saved search are not in correct place in mapping * chore: adding log statement to see the problem * fix: add it at the correct place * fix: add test case + update errors based on those * fix: add missing columns for daac archiving * fix: file extension can be an array * fix: update testcase + fix bugs * fix: update test case
1 parent 489e6da commit 7844796

28 files changed

+964
-10
lines changed

cumulus_lambda_functions/daac_archiver/__init__.py

Whitespace-only changes.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from cumulus_lambda_functions.lib.lambda_logger_generator import LambdaLoggerGenerator
2+
3+
4+
def lambda_handler(event, context):
5+
"""
6+
:param event:
7+
:param context:
8+
:return:
9+
{'Records': [{'messageId': '6ff7c6fd-4053-4ab4-bc12-c042be1ed275', 'receiptHandle': 'AQEBYASiFPjQT5JBI2KKCTF/uQhHfJt/tHhgucslQQdvkNVxcXCNi2E5Ux4U9N0eu7RfvlnvtycjUh0gdL7jIeoyH+VRKSF61uAJuT4p31BsNe0GYu49N9A6+kxjP/RrykR7ZofmQRdHToX1ugRc76SMRic4H/ZZ89YAHA2QeomJFMrYywIxlk8OAzYaBf2dQI7WexjY5u1CW00XNMbTGyTo4foVPxcSn6bdFpfgxW/L7yJMX/0YQvrA9ruiuQ+lrui+6fWYh5zEk3f5v1bYtUQ6DtyyfbtMHZQJTJpUlWAFRzzN+3melilH7FySyOGDXhPb0BOSzmdKq9wBbfLW/YPb7l99ejq4GfRfj8LyI4EtB96vTeUw4LCgUqbZcBrxbGBLUXMacweh+gCjHav9ylqr2SeOiqG3vWPq9pwFYQIDqNE=', 'body': '{\n "Type" : "Notification",\n "MessageId" : "33e1075a-435c-5217-a33d-59fae85e19b2",\n "TopicArn" : "arn:aws:sns:us-west-2:237868187491:uds-sbx-cumulus-granules_cnm_ingester",\n "Subject" : "Amazon S3 Notification",\n "Message" : "{\\"Service\\":\\"Amazon S3\\",\\"Event\\":\\"s3:TestEvent\\",\\"Time\\":\\"2024-04-22T18:13:22.416Z\\",\\"Bucket\\":\\"uds-sbx-cumulus-staging\\",\\"RequestId\\":\\"DQ4T0GRVFPSX45C9\\",\\"HostId\\":\\"gHBFnYNmfnGDZBmqoQwA3RScjtjBk5lr426moGxu8IDpe5UhWAqNTxHqilWBoPN1njzIrzNrf8c=\\"}",\n "Timestamp" : "2024-04-22T18:13:22.434Z",\n "SignatureVersion" : "1",\n "Signature" : "RvSxqpU7J7CCJXbin9cXqTxzjMjgAUFtk/n454mTMcOe5x3Ay1w4AHfzyeYQCFBdLHNBa8n3OdMDoDlJqyVQMb8k+nERaiZWN2oqFVDRqT9pqSr89b+4FwlhPv6TYy2pBa/bgjZ4cOSYsey1uSQ3hjl0idfssvuV5cCRxQScbA+yu8Gcv9K7Oqgy01mC0sDHiuPIifhFXxupG5ygbjqoHIB+1gdMEbBwyixoY5GOpHM/O2uHNF+dJDjax1WMxQ2FzVjiFeCa+tNcjovF059+tx2v1YmDq/kEAFrN6DAtP6R4zKag62P9jkvjU/wHYJ2jjXmZAqoG+nuzAo24HiZPSw==",\n "SigningCertURL" : "https://sns.us-west-2.amazonaws.com/SimpleNotificationService-60eadc530605d63b8e62a523676ef735.pem",\n "UnsubscribeURL" : "https://sns.us-west-2.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:us-west-2:237868187491:uds-sbx-cumulus-granules_cnm_ingester:76cbefa1-addf-45c2-97e1-ae16986b195b"\n}', 'attributes': {'ApproximateReceiveCount': '1', 'SentTimestamp': '1713809602474', 'SenderId': 'AIDAIYLAVTDLUXBIEIX46', 'ApproximateFirstReceiveTimestamp': '1713809602483'}, 'messageAttributes': {}, 'md5OfBody': 'c6d06d1b742ad5bd2cfe5f542640aad2', 'eventSource': 'aws:sqs', 'eventSourceARN': 'arn:aws:sqs:us-west-2:237868187491:uds-sbx-cumulus-granules_cnm_ingester', 'awsRegion': 'us-west-2'}]}
10+
"""
11+
LambdaLoggerGenerator.remove_default_handlers()
12+
print('To be implemented later')
13+
return

cumulus_lambda_functions/granules_to_es/granules_index_mapping.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,28 @@
11
class GranulesIndexMapping:
2+
percolator_mappings = {
3+
"daac_collection_name": {
4+
"type": "keyword"
5+
},
6+
"daac_data_version": {
7+
"type": "keyword"
8+
},
9+
"archiving_types": {
10+
"type": "object",
11+
"properties": {
12+
"data_type": {"type": "keyword"},
13+
"file_extension": {"type": "keyword"},
14+
}
15+
},
16+
"daac_sns_topic_arn": {
17+
"type": "keyword"
18+
},
19+
"ss_query": {
20+
"type": "percolator"
21+
},
22+
"ss_username": {
23+
"type": "keyword"
24+
},
25+
}
226
stac_mappings = {
327
"event_time": {"type": "long"},
428
"type": {"type": "keyword"},

cumulus_lambda_functions/granules_to_es/granules_indexer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from cumulus_lambda_functions.lib.json_validator import JsonValidator
1515

1616
from cumulus_lambda_functions.lib.aws.aws_message_transformers import AwsMessageTransformers
17-
from cumulus_lambda_functions.uds_api.dapa.granules_db_index import GranulesDbIndex
17+
from cumulus_lambda_functions.lib.uds_db.granules_db_index import GranulesDbIndex
1818

1919
LOGGER = LambdaLoggerGenerator.get_logger(__name__, LambdaLoggerGenerator.get_level_from_env())
2020

cumulus_lambda_functions/lib/aws/aws_sns.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,18 @@ def publish_message(self, msg_str: str):
3232
# MessageGroupId='string'
3333
)
3434
return response
35+
36+
def create_sqs_subscription(self, sqs_arn):
37+
# https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/sns/client/subscribe.html
38+
if self.__topic_arn == '':
39+
raise ValueError('missing topic arn to publish message')
40+
response = self.__sns_client.subscribe(
41+
TopicArn=self.__topic_arn,
42+
Protocol='sqs',
43+
Endpoint=sqs_arn, # For the sqs protocol, the endpoint is the ARN of an Amazon SQS queue.
44+
# Attributes={
45+
# 'string': 'string'
46+
# },
47+
ReturnSubscriptionArn=True # if the API request parameter ReturnSubscriptionArn is true, then the value is always the subscription ARN, even if the subscription requires confirmation.
48+
)
49+
return response['SubscriptionArn']

cumulus_lambda_functions/lib/aws/es_abstract.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
class ESAbstract(ABC):
88
@abstractmethod
9+
def migrate_index_data(self, old_index, new_index):
10+
return
11+
@abstractmethod
912
def create_index(self, index_name, index_body):
1013
return
1114

cumulus_lambda_functions/lib/aws/es_middleware.py

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ def __init__(self, index, base_url, port=443) -> None:
1616
raise ValueError(f'index or base_url is None')
1717
self.__index = index
1818
base_url = base_url.replace('https://', '') # hide https
19-
self._engine = Elasticsearch(hosts=[{'host': base_url, 'port': port}])
19+
# https://elasticsearch-py.readthedocs.io/en/v7.13.4/api.html#elasticsearch.Elasticsearch
20+
self._engine = Elasticsearch(hosts=[{'host': base_url, 'port': port, 'use_ssl': True}])
2021

2122
def __validate_index(self, index):
2223
if index is not None:
@@ -45,6 +46,25 @@ def __check_errors_for_bulk(self, index_result):
4546
LOGGER.exception('failed to add some items. details: {}'.format(err_list))
4647
return err_list
4748

49+
def migrate_index_data(self, old_index, new_index, remove_old_data=True):
50+
if not self.has_index(old_index) or not self.has_index(new_index):
51+
raise ValueError(f'at least one of the indices do not exist: [{old_index}, {new_index}]')
52+
result = self._engine.reindex(
53+
body={
54+
"source": {
55+
"index": old_index,
56+
# "query": {
57+
# "match_all": {}
58+
# }
59+
},
60+
"dest": {
61+
"index": new_index
62+
}
63+
}
64+
)
65+
self.delete_by_query({'query': {'match_all': {}}}, old_index)
66+
return result
67+
4868
def create_index(self, index_name, index_body):
4969
result = self._engine.indices.create(index=index_name, body=index_body, include_type_name=False)
5070
if 'acknowledged' not in result:
@@ -66,6 +86,7 @@ def swap_index_for_alias(self, alias_name, old_index_name, new_index_name):
6686
try:
6787
temp_result = self._engine.indices.delete_alias(index=old_index_name, name=alias_name)
6888
except NotFoundError as ee:
89+
LOGGER.exception(f'error while unlinking {old_index_name} from {alias_name}')
6990
temp_result = {}
7091
result = self.create_alias(new_index_name, alias_name)
7192
return result
@@ -91,6 +112,7 @@ def delete_index(self, index_name):
91112
return result['acknowledged']
92113

93114
def index_many(self, docs=None, doc_ids=None, doc_dict=None, index=None):
115+
# https://elasticsearch-py.readthedocs.io/en/v7.13.4/api.html#elasticsearch.Elasticsearch.bulk
94116
doc_dict = self.__get_doc_dict(docs, doc_ids, doc_dict)
95117
body = []
96118
for k, v in doc_dict.items():
@@ -115,9 +137,9 @@ def index_one(self, doc, doc_id, index=None):
115137
body=doc, doc_type=DEFAULT_TYPE, id=doc_id)
116138
LOGGER.info('indexed. result: {}'.format(index_result))
117139
pass
118-
except:
140+
except Exception as e:
119141
LOGGER.exception('cannot add a new index with id: {} for index: {}'.format(doc_id, index))
120-
return None
142+
raise e
121143
return self
122144

123145
def update_many(self, docs=None, doc_ids=None, doc_dict=None, index=None):
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
from cumulus_lambda_functions.lib.json_validator import JsonValidator
2+
3+
from cumulus_lambda_functions.lib.uds_db.db_constants import DBConstants
4+
5+
from cumulus_lambda_functions.lib.aws.es_abstract import ESAbstract
6+
7+
from cumulus_lambda_functions.lib.aws.es_factory import ESFactory
8+
9+
10+
class UdsArchiveConfigIndex:
11+
basic_schema = {
12+
'type': 'object',
13+
'required': ['daac_collection_id', 'daac_sns_topic_arn', 'daac_data_version', 'collection', 'ss_username', 'archiving_types'],
14+
'properties': {
15+
'daac_collection_id': {'type': 'string'},
16+
'daac_sns_topic_arn': {'type': 'string'},
17+
'daac_data_version': {'type': 'string'},
18+
'collection': {'type': 'string'},
19+
'ss_username': {'type': 'string'},
20+
'archiving_types': {'type': 'array', 'items': {'type': 'object'}},
21+
}
22+
}
23+
def __init__(self, es_url, es_port=443):
24+
self.__es: ESAbstract = ESFactory().get_instance('AWS',
25+
index='TODO',
26+
base_url=es_url,
27+
port=es_port)
28+
self.__tenant, self.__venue = '', ''
29+
30+
def set_tenant_venue(self, tenant, venue):
31+
self.__tenant, self.__venue = tenant, venue
32+
return self
33+
34+
def get_config(self, collection_id, username=None):
35+
read_alias_name = f'{DBConstants.granules_read_alias_prefix}_{self.__tenant}_{self.__venue}_perc'.lower().strip()
36+
conditions = [{"term": {"collection": {"value": collection_id}}}]
37+
if username is not None:
38+
conditions.append({"term": {"ss_username": {"value": username}}})
39+
result = self.__es.query({
40+
'size': 9999,
41+
'query': {
42+
'bool': {
43+
'must': conditions
44+
}
45+
}
46+
}, read_alias_name)
47+
return [k['_source'] for k in result['hits']['hits']]
48+
49+
def add_new_config(self, ingesting_dict: dict):
50+
result = JsonValidator(self.basic_schema).validate(ingesting_dict)
51+
if result is not None:
52+
raise ValueError(f'input ingesting_dict has basic_schema validation errors: {result}')
53+
write_alias_name = f'{DBConstants.granules_write_alias_prefix}_{self.__tenant}_{self.__venue}_perc'.lower().strip()
54+
ingesting_dict['daac_collection_name'] = ingesting_dict.pop('daac_collection_id')
55+
ingesting_dict['ss_query'] = {
56+
"bool": {
57+
"must": [{
58+
"term": {"collection": {"value": ingesting_dict['collection']} }
59+
}]
60+
}
61+
}
62+
result = self.__es.index_one(ingesting_dict, f"{ingesting_dict['daac_collection_name']}__{ingesting_dict['collection']}", index=write_alias_name)
63+
return
64+
65+
def delete_config(self, collection_id, daac_collection_id):
66+
write_alias_name = f'{DBConstants.granules_write_alias_prefix}_{self.__tenant}_{self.__venue}_perc'.lower().strip()
67+
self.__es.delete_by_query({
68+
'size': 9999,
69+
'query': {
70+
'bool': {
71+
'must': [
72+
{ "term": {"collection": {"value": collection_id}} },
73+
{"term": {"daac_collection_name": {"value": daac_collection_id}}},
74+
]
75+
}
76+
}
77+
}, write_alias_name)
78+
return
79+
80+
def update_config(self, collection_id, daac_collection_id, daac_sns_topic_arn, username):
81+
write_alias_name = f'{DBConstants.granules_write_alias_prefix}_{self.__tenant}_{self.__venue}_perc'.lower().strip()
82+
result = self.__es.update_one({
83+
"collection": collection_id,
84+
"daac_collection_name": daac_collection_id,
85+
"daac_sns_topic_arn": daac_sns_topic_arn,
86+
"ss_query": {
87+
"bool": {
88+
"must": [{
89+
"term": {"collection": {"value": collection_id}}
90+
}]
91+
}
92+
},
93+
"ss_username": username,
94+
}, f'{daac_collection_id}__{collection_id}', index=write_alias_name)
95+
return

cumulus_lambda_functions/uds_api/dapa/granules_db_index.py renamed to cumulus_lambda_functions/lib/uds_db/granules_db_index.py

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def __init__(self):
3030
# "event_time": {"type": "long"}
3131
# }
3232
self.__default_fields = GranulesIndexMapping.stac_mappings
33+
self.__ss_fields = GranulesIndexMapping.percolator_mappings
3334

3435
@staticmethod
3536
def to_es_bbox(bbox_array):
@@ -68,8 +69,13 @@ def default_fields(self, val):
6869
self.__default_fields = val
6970
return
7071

71-
def __add_custom_mappings(self, es_mapping: dict):
72+
def __add_custom_mappings(self, es_mapping: dict, include_perc=False):
73+
potential_ss_fields = {} if not include_perc else self.__ss_fields
7274
customized_es_mapping = deepcopy(self.default_fields)
75+
customized_es_mapping = {
76+
**potential_ss_fields,
77+
**self.default_fields,
78+
}
7379
customized_es_mapping['properties']['properties'] = {
7480
**es_mapping,
7581
**self.default_fields['properties']['properties'],
@@ -102,6 +108,7 @@ def create_new_index(self, tenant, tenant_venue, es_mapping: dict):
102108
tenant = tenant.replace(':', '--')
103109
write_alias_name = f'{DBConstants.granules_write_alias_prefix}_{tenant}_{tenant_venue}'.lower().strip()
104110
read_alias_name = f'{DBConstants.granules_read_alias_prefix}_{tenant}_{tenant_venue}'.lower().strip()
111+
105112
current_alias = self.__es.get_alias(write_alias_name)
106113
# {'meta_labels_v2': {'aliases': {'metadata_labels': {}}}}
107114
current_index_name = f'{write_alias_name}__v0' if current_alias == {} else [k for k in current_alias.keys()][0]
@@ -122,6 +129,28 @@ def create_new_index(self, tenant, tenant_venue, es_mapping: dict):
122129
self.__es.create_index(new_index_name, index_mapping)
123130
self.__es.create_alias(new_index_name, read_alias_name)
124131
self.__es.swap_index_for_alias(write_alias_name, current_index_name, new_index_name)
132+
133+
write_perc_alias_name = f'{DBConstants.granules_write_alias_prefix}_{tenant}_{tenant_venue}_perc'.lower().strip()
134+
read_perc_alias_name = f'{DBConstants.granules_read_alias_prefix}_{tenant}_{tenant_venue}_perc'.lower().strip()
135+
current_perc_alias = self.__es.get_alias(write_perc_alias_name)
136+
current_perc_index_name = f'{write_alias_name}_perc__v0' if current_perc_alias == {} else [k for k in current_perc_alias.keys()][0]
137+
new_perc_index_name = f'{DBConstants.granules_index_prefix}_{tenant}_{tenant_venue}_perc__v{new_version:02d}'.lower().strip()
138+
customized_perc_es_mapping = self.__add_custom_mappings(es_mapping, True)
139+
LOGGER.debug(f'customized_perc_es_mapping: {customized_perc_es_mapping}')
140+
perc_index_mapping = {
141+
"settings": {
142+
"number_of_shards": 3,
143+
"number_of_replicas": 2
144+
},
145+
"mappings": {
146+
"dynamic": "strict",
147+
"properties": customized_perc_es_mapping,
148+
}
149+
}
150+
self.__es.create_index(new_perc_index_name, perc_index_mapping)
151+
self.__es.create_alias(new_perc_index_name, read_perc_alias_name)
152+
self.__es.swap_index_for_alias(write_perc_alias_name, current_perc_index_name, new_perc_index_name)
153+
self.__es.migrate_index_data(current_perc_index_name, new_perc_index_name)
125154
return
126155

127156
def get_latest_index(self, tenant, tenant_venue):

cumulus_lambda_functions/metadata_stac_generate_cmr/generate_cmr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from cumulus_lambda_functions.lib.metadata_extraction.echo_metadata import EchoMetadata
1414
from cumulus_lambda_functions.lib.time_utils import TimeUtils
1515
from cumulus_lambda_functions.metadata_stac_generate_cmr.stac_input_metadata import StacInputMetadata
16-
from cumulus_lambda_functions.uds_api.dapa.granules_db_index import GranulesDbIndex
16+
from cumulus_lambda_functions.lib.uds_db.granules_db_index import GranulesDbIndex
1717

1818
LOGGER = LambdaLoggerGenerator.get_logger(__name__, LambdaLoggerGenerator.get_level_from_env())
1919

cumulus_lambda_functions/mock_daac/__init__.py

Whitespace-only changes.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from cumulus_lambda_functions.lib.lambda_logger_generator import LambdaLoggerGenerator
2+
3+
4+
def lambda_handler(event, context):
5+
"""
6+
:param event:
7+
:param context:
8+
:return:
9+
{'Records': [{'messageId': '6ff7c6fd-4053-4ab4-bc12-c042be1ed275', 'receiptHandle': 'AQEBYASiFPjQT5JBI2KKCTF/uQhHfJt/tHhgucslQQdvkNVxcXCNi2E5Ux4U9N0eu7RfvlnvtycjUh0gdL7jIeoyH+VRKSF61uAJuT4p31BsNe0GYu49N9A6+kxjP/RrykR7ZofmQRdHToX1ugRc76SMRic4H/ZZ89YAHA2QeomJFMrYywIxlk8OAzYaBf2dQI7WexjY5u1CW00XNMbTGyTo4foVPxcSn6bdFpfgxW/L7yJMX/0YQvrA9ruiuQ+lrui+6fWYh5zEk3f5v1bYtUQ6DtyyfbtMHZQJTJpUlWAFRzzN+3melilH7FySyOGDXhPb0BOSzmdKq9wBbfLW/YPb7l99ejq4GfRfj8LyI4EtB96vTeUw4LCgUqbZcBrxbGBLUXMacweh+gCjHav9ylqr2SeOiqG3vWPq9pwFYQIDqNE=', 'body': '{\n "Type" : "Notification",\n "MessageId" : "33e1075a-435c-5217-a33d-59fae85e19b2",\n "TopicArn" : "arn:aws:sns:us-west-2:237868187491:uds-sbx-cumulus-granules_cnm_ingester",\n "Subject" : "Amazon S3 Notification",\n "Message" : "{\\"Service\\":\\"Amazon S3\\",\\"Event\\":\\"s3:TestEvent\\",\\"Time\\":\\"2024-04-22T18:13:22.416Z\\",\\"Bucket\\":\\"uds-sbx-cumulus-staging\\",\\"RequestId\\":\\"DQ4T0GRVFPSX45C9\\",\\"HostId\\":\\"gHBFnYNmfnGDZBmqoQwA3RScjtjBk5lr426moGxu8IDpe5UhWAqNTxHqilWBoPN1njzIrzNrf8c=\\"}",\n "Timestamp" : "2024-04-22T18:13:22.434Z",\n "SignatureVersion" : "1",\n "Signature" : "RvSxqpU7J7CCJXbin9cXqTxzjMjgAUFtk/n454mTMcOe5x3Ay1w4AHfzyeYQCFBdLHNBa8n3OdMDoDlJqyVQMb8k+nERaiZWN2oqFVDRqT9pqSr89b+4FwlhPv6TYy2pBa/bgjZ4cOSYsey1uSQ3hjl0idfssvuV5cCRxQScbA+yu8Gcv9K7Oqgy01mC0sDHiuPIifhFXxupG5ygbjqoHIB+1gdMEbBwyixoY5GOpHM/O2uHNF+dJDjax1WMxQ2FzVjiFeCa+tNcjovF059+tx2v1YmDq/kEAFrN6DAtP6R4zKag62P9jkvjU/wHYJ2jjXmZAqoG+nuzAo24HiZPSw==",\n "SigningCertURL" : "https://sns.us-west-2.amazonaws.com/SimpleNotificationService-60eadc530605d63b8e62a523676ef735.pem",\n "UnsubscribeURL" : "https://sns.us-west-2.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:us-west-2:237868187491:uds-sbx-cumulus-granules_cnm_ingester:76cbefa1-addf-45c2-97e1-ae16986b195b"\n}', 'attributes': {'ApproximateReceiveCount': '1', 'SentTimestamp': '1713809602474', 'SenderId': 'AIDAIYLAVTDLUXBIEIX46', 'ApproximateFirstReceiveTimestamp': '1713809602483'}, 'messageAttributes': {}, 'md5OfBody': 'c6d06d1b742ad5bd2cfe5f542640aad2', 'eventSource': 'aws:sqs', 'eventSourceARN': 'arn:aws:sqs:us-west-2:237868187491:uds-sbx-cumulus-granules_cnm_ingester', 'awsRegion': 'us-west-2'}]}
10+
"""
11+
LambdaLoggerGenerator.remove_default_handlers()
12+
print('To be implemented later')
13+
return

cumulus_lambda_functions/uds_api/custom_meta_admin_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from cumulus_lambda_functions.cumulus_es_setup.es_setup import SetupESIndexAlias
44
from cumulus_lambda_functions.lib.lambda_logger_generator import LambdaLoggerGenerator
55
from cumulus_lambda_functions.uds_api.dapa.auth_crud import AuthCrud, AuthDeleteModel, AuthListModel, AuthAddModel
6-
from cumulus_lambda_functions.uds_api.dapa.granules_db_index import GranulesDbIndex
6+
from cumulus_lambda_functions.lib.uds_db.granules_db_index import GranulesDbIndex
77
from cumulus_lambda_functions.uds_api.fast_api_utils import FastApiUtils
88
from cumulus_lambda_functions.uds_api.web_service_constants import WebServiceConstants
99
from fastapi import APIRouter, HTTPException, Request, Response

0 commit comments

Comments
 (0)