# hkb-net-flow-logs

VPC Flow Logs delivery to /hkb/network/flow-logs only.

- **Lives in:** [Sandbox](/architecture/sandbox/), [Dev](/architecture/dev/), [Prod](/architecture/prod/). **Trusted by:** `vpc-flow-logs.amazonaws.com`.
- **Boundary:** `hkb-workload-boundary`.
- **Reach:** 4 named actions across 1 service (logs); 0 statements on all resources.
- **Source:** `network/hkb-vpc.yaml`, resource `FlowLogRole`.

## Trust policy

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

## Permissions

```yaml
Policies:
  - PolicyName: hkb-net-flow-logs
    PolicyDocument:
      Version: "2012-10-17"
      Statement:
        - Sid: DeliverToTheFlowLogGroup
          Effect: Allow
          Action:
            - logs:CreateLogStream
            - logs:PutLogEvents
            - logs:DescribeLogGroups
            - logs:DescribeLogStreams
          Resource:
            - !GetAtt FlowLogGroup.Arn
            - !Sub ${FlowLogGroup.Arn}:log-stream:*
```
