@@ -50,6 +50,9 @@ Parameters:
5050 SchedulerExecutionRoleARN :
5151 Type : String
5252 Description : Common role for module Scheduler execution
53+ LambdaManageGlueTableARN :
54+ Type : String
55+ Description : ARN of a Lambda for Managing GlueTable
5356
5457Outputs :
5558 StepFunctionARN :
@@ -244,11 +247,9 @@ Resources:
244247 # Get all checks metadata first for dynamic field mapping
245248 checks_metadata = {}
246249 try:
247- checks_response = trustedadvisor.get_paginator('list_checks').paginate()
248- for page in checks_response:
249- for check in page.get('checkSummaries', []):
250- # Store metadata dictionary for each check ARN
251- checks_metadata[check['arn']] = check.get('metadata', {})
250+ for check in trustedadvisor.get_paginator('list_checks').paginate().search('checkSummaries'):
251+ # Store metadata dictionary for each check ARN
252+ checks_metadata[check['arn']] = check.get('metadata', {})
252253 except Exception as e:
253254 print(f"Warning: Could not fetch checks metadata: {str(e)}")
254255 checks_metadata = {}
@@ -367,10 +368,9 @@ Resources:
367368
368369 # Add glue table based on existing TAO columns
369370 TADataTable :
370- Type : AWS::Glue::Table
371+ Type : Custom::ManageGlueTable
371372 Properties :
372- DatabaseName : !Ref DatabaseName
373- CatalogId : !Ref AWS::AccountId
373+ ServiceToken : !Ref LambdaManageGlueTableARN
374374 TableInput :
375375 Name : trusted_advisor_data
376376 TableType : EXTERNAL_TABLE
@@ -895,10 +895,9 @@ Resources:
895895
896896 # Add glue table for trusted advisor priority data
897897 TAPriorityTable :
898- Type : AWS::Glue::Table
898+ Type : Custom::ManageGlueTable
899899 Properties :
900- DatabaseName : !Ref DatabaseName
901- CatalogId : !Ref AWS::AccountId
900+ ServiceToken : !Ref LambdaManageGlueTableARN
902901 TableInput :
903902 Name : trusted_advisor_priority_data
904903 TableType : EXTERNAL_TABLE
0 commit comments