# hkb-site-traffic-schedule

EventBridge Scheduler role. Starts the hkb-site-traffic job, nothing else.

- **Lives in:** [Prod](/architecture/prod/). **Trusted by:** `scheduler.amazonaws.com`.
- **Boundary:** `hkb-pipeline-boundary`.
- **Reach:** 1 named action across 1 service (codebuild); 0 statements on all resources.
- **Source:** `baseline/hkb-baseline-site-traffic.yaml`, resource `ScheduleRole`.

## Trust policy

```yaml
AssumeRolePolicyDocument:
  Version: "2012-10-17"
  Statement:
    - Effect: Allow
      Principal:
        Service: scheduler.amazonaws.com
      Action: sts:AssumeRole
      Condition:
        StringEquals:
          aws:SourceAccount: !Ref AWS::AccountId
```

## Permissions

```yaml
Policies:
  - PolicyName: hkb-site-traffic-schedule
    PolicyDocument:
      Version: "2012-10-17"
      Statement:
        - Sid: StartTheJob
          Effect: Allow
          Action: codebuild:StartBuild
          Resource: !Sub arn:${AWS::Partition}:codebuild:${AWS::Region}:${AWS::AccountId}:project/hkb-site-traffic
```
