infra/batch_pipeline_construct.py [259:289]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                "SCHEDULE_RULE_NAME": schedule_rule_name,
            },
        )

        # Add permissions to put job status (if we want to call this directly within CodePipeline)
        # see: https://docs.aws.amazon.com/codepipeline/latest/userguide/approvals-iam-permissions.html
        lambda_pipeline_change.add_to_role_policy(
            iam.PolicyStatement(
                actions=[
                    "codepipeline:EnableStageTransition",
                    "codepipeline:DisableStageTransition",
                ],
                resources=["arn:aws:codepipeline:*:*:sagemaker-*"],
            )
        )

        lambda_pipeline_change.add_to_role_policy(
            iam.PolicyStatement(
                actions=[
                    "events:EnableRule",
                    "events:DisableRule",
                ],
                resources=["arn:aws:events:*:*:rule/sagemaker-*"],
            )
        )

        # Rule to enable/disable rules when start/stop of sagemaker pipeline
        events.Rule(
            self,
            "SagemakerPipelineRule",
            rule_name=f"sagemaker-{project_name}-sagemakerpipeline-{construct_id}",
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



infra/build_pipeline_construct.py [312:342]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                "SCHEDULE_RULE_NAME": schedule_rule_name,
            },
        )

        # Add permissions to put job status (if we want to call this directly within CodePipeline)
        # see: https://docs.aws.amazon.com/codepipeline/latest/userguide/approvals-iam-permissions.html
        lambda_pipeline_change.add_to_role_policy(
            iam.PolicyStatement(
                actions=[
                    "codepipeline:EnableStageTransition",
                    "codepipeline:DisableStageTransition",
                ],
                resources=["arn:aws:codepipeline:*:*:sagemaker-*"],
            )
        )

        lambda_pipeline_change.add_to_role_policy(
            iam.PolicyStatement(
                actions=[
                    "events:EnableRule",
                    "events:DisableRule",
                ],
                resources=["arn:aws:events:*:*:rule/sagemaker-*"],
            )
        )

        # Rule to enable/disable rules when start/stop of sagemaker pipeline
        events.Rule(
            self,
            "SagemakerPipelineRule",
            rule_name=f"sagemaker-{project_name}-sagemakerpipeline-{construct_id}",
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



