awslabs / cid-framework

Apache License 2.0
23 stars 21 forks source link

Pass Schedule parameter to all modules #115

Closed joegajeckyj closed 5 months ago

joegajeckyj commented 6 months ago

Inside data-collection/deploy/deploy-data-collection.yaml

Please can you update the template to pass through the Schedule parameter similar to the optimizer module to all modules i.e.

ComputeOptimizerModule:
    Type: AWS::CloudFormation::Stack
    Condition: DeployComputeOptimizerModule
    Properties:
      TemplateURL: !Sub "https://${CFNSourceBucket}.s3.amazonaws.com/cfn/data-collection/module-compute-optimizer.yaml"
      Parameters:
        DestinationBucket: !Ref S3Bucket
        ManagementRoleName: !Sub "${ResourcePrefix}${ManagementAccountRole}"
        ManagementAccountID: !Ref ManagementAccountID
        **Schedule: !Ref Schedule**
        ResourcePrefix: !Ref ResourcePrefix
        BucketPrefix:  !Ref DestinationBucket
        RegionsInScope:
          Fn::If:
            - RegionsInScopeIsEmpty
            - !Sub "${AWS::Region}"
            - !Join [ '', !Split [ ' ', !Ref RegionsInScope  ] ] # remove spaces
        LambdaAnalyticsARN: !GetAtt LambdaAnalytics.Arn
        AccountCollectorLambdaARN: !Sub "${AccountCollector.Outputs.LambdaFunctionARN}"
        StepFunctionTemplate: !FindInMap [CodeTemplates, StepFunction, code]
        StepFunctionExecutionRoleARN: !GetAtt StepFunctionExecutionRole.Arn
        SchedulerExecutionRoleARN: !GetAtt SchedulerExecutionRole.Arn
esc1144 commented 5 months ago

Hi joegajeckyj,

Thank you for your feedback. Your timing was very good as we had a change to the scheduling in the pipeline already and have just merged it into the latest release this morning. We implemented it as providing the user the ability to apply two different schedules, one less frequent for the Trusted Advisor, Cost Optimization Hub, Compute Optimizer, Organizations Data, Rightsizing, RDS Utilization, Inventory Collector, Transit Gateway, Backup, and ECS Chargeback modules. The default is 14 days. The second schedule is more frequent and targeting Cost Anomalies, and Budgets, where more regular updates can be particularly beneficial. The default there is daily. We also made sure the value from either is appropriately passed to all of the modules, per the above (more directly to your suggestion). Finally, we added some customization guidance for tailoring individual modules with more granularity.

We hope that helps you with your management of the Data Collection framework and encourage your feedback. Please feel free to make additional suggestions as you use the tools.

Kindly, CID Team