hkb-net-nat-scheduler
EventBridge Scheduler. Starts and stops the NAT instance on the weekday window.
- Lives in: Sandbox, Dev, Prod. Trusted by:
scheduler.amazonaws.com. - Boundary:
hkb-workload-boundary. - Reach: 3 named actions across 2 services (ec2, kms); 0 statements on all resources.
- Source:
network/hkb-network.yaml, resourceSchedulerRole.
Trust policy
AssumeRolePolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: Allow
Principal:
Service: scheduler.amazonaws.com
Action: sts:AssumeRole
Condition:
StringEquals:
aws:SourceAccount: !Ref AWS::AccountId
Permissions
Policies:
- PolicyName: hkb-net-nat-scheduler
PolicyDocument:
Version: "2012-10-17"
Statement:
- Sid: StartAndStopTheNatInstance
Effect: Allow
Action:
- ec2:StartInstances
- ec2:StopInstances
Resource: !Sub arn:${AWS::Partition}:ec2:${AWS::Region}:${AWS::AccountId}:instance/${NatInstance}
# Starting an instance with an encrypted root volume makes an EBS grant.
- Sid: EbsGrants
Effect: Allow
Action: kms:CreateGrant
Resource: !Sub arn:${AWS::Partition}:kms:${AWS::Region}:${AWS::AccountId}:key/*
Condition:
Bool:
kms:GrantIsForAWSResource: "true"
Page information
- Owner
- Identity and Access
- Status
- current Current: generated from the templates and records in the repository at this build.
- Generated from
network/hkb-network.yaml- Linked from
- Dev, Sandbox, NAT instance, NAT instance, NAT instance, Access and 2 more
- Plain markdown
- /wiki/roles/network/hkb-net-nat-scheduler/index.md