You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What issue is being seen? Describe what should be happening instead of the bug, for example: Cartography should not crash, the expected value isn't returned, the data schema is wrong, etc.
Sync crashes when calling describe launch template versions because we try to describe a template that may no longer exist.
To Reproduce:
Steps to reproduce the behavior. Provide all data and inputs required to reproduce the issue.
Run a sync on an account where launch templates are being spun up and down (I think).
Proposed fix: add error handling to skip over these cases.
Logs:
If applicable, copy and paste your console log with the failing stack trace.
Traceback (most recent call last):
File "cartography/sync.py", line 191, in run_with_config
return sync.run(neo4j_driver, config)
File "cartography/sync.py", line 113, in run
stage_func(neo4j_session, config)
File "cartography/util.py", line 192, in timed
result = method(*args, **kwargs)
File "cartography/intel/aws/__init__.py", line 298, in start_aws_ingestion
sync_successful = _sync_multiple_accounts(
File "cartography/intel/aws/__init__.py", line 196, in _sync_multiple_accounts
raise Exception('\n'.join(exception_tracebacks))
Exception: 2024-06-20 16:17:40.827071 - Exception for account ID: XXX
Traceback (most recent call last):
File "cartography/intel/aws/__init__.py", line 169, in _sync_multiple_accounts
_sync_one_account(
File "cartography/intel/aws/__init__.py", line 64, in _sync_one_account
RESOURCE_FUNCTIONS[func_name](**sync_args)
File "cartography/util.py", line 192, in timed
result = method(*args, **kwargs)
File "cartography/intel/aws/ec2/launch_templates.py", line 143, in sync_ec2_launch_templates
versions = get_launch_template_versions(boto3_session, templates, region)
File "cartography/util.py", line 192, in timed
result = method(*args, **kwargs)
File "backoff/_sync.py", line 105, in retry
ret = target(*args, **kwargs)
File "cartography/util.py", line 279, in inner_function
return func(*args, **kwargs)
File "cartography/intel/aws/ec2/launch_templates.py", line 67, in get_launch_template_versions
for versions in v_paginator.paginate(LaunchTemplateId=template['LaunchTemplateId']):
File "botocore/paginate.py", line 269, in __iter__
response = self._make_request(current_kwargs)
File "botocore/paginate.py", line 357, in _make_request
return self._method(**current_kwargs)
File "botocore/client.py", line 565, in _api_call
return self._make_api_call(operation_name, kwargs)
File "botocore/client.py", line 1021, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (InvalidLaunchTemplateId.NotFound) when calling the DescribeLaunchTemplateVersions operation: The specified launch template, with template ID lt-XXX, does not exist.
Please complete the following information::
Cartography release version or commit hash [e.g. 0.12.0 or 95e8e11]
0.92.0
The text was updated successfully, but these errors were encountered:
achantavy
changed the title
Sync crashes when we try to describe a launch template that no longer exists
Sync crashes when we try to describe a launch template version on a template that no longer exists
Jun 21, 2024
Description:
Sync crashes when calling describe launch template versions because we try to describe a template that may no longer exist.
To Reproduce:
Run a sync on an account where launch templates are being spun up and down (I think).
Proposed fix: add error handling to skip over these cases.
Logs:
Please complete the following information::
The text was updated successfully, but these errors were encountered: