latest run 54 pass 0 fail 0 skipevidence →
HKB Operations: pages
HKB OperationsKnowledge space

Starred pages

Pages

Page directory · Labels · [ hides this

hkb-pipeline-site-sync

Site content role (step 4.4, DQ-59). Reads the hkb-site stack outputs, syncs the built site to the site bucket and clears the CloudFront cache. No CloudFormation changes, no IAM.

  • Lives in: Sandbox, Dev, Prod. Trusted by: hkb-pipeline-sync.
  • Boundary: hkb-pipeline-boundary.
  • Reach: 9 named actions across 4 services (cloudformation, cloudfront, kms, s3); 0 statements on all resources.
  • Source: baseline/hkb-baseline-iam.yaml, resource SiteSyncRole.

Trust policy

AssumeRolePolicyDocument:
  Version: "2012-10-17"
  Statement:
    - Effect: Allow
      Principal:
        AWS: !Sub arn:${AWS::Partition}:iam::${SharedServicesAccountId}:role/hkb-pipeline-sync
      Action: sts:AssumeRole

Permissions

Policies:
  - PolicyName: hkb-pipeline-site-sync
    PolicyDocument:
      Version: "2012-10-17"
      Statement:
        - Sid: ReadSiteStackOutputs
          Effect: Allow
          Action: cloudformation:DescribeStacks
          Resource: !Sub arn:${AWS::Partition}:cloudformation:*:${AWS::AccountId}:stack/hkb-site/*
        - Sid: SyncSiteContent
          Effect: Allow
          Action:
            - s3:ListBucket
            - s3:GetBucketLocation
            - s3:PutObject
            - s3:DeleteObject
          # The bucket is named hkb-site-<account> (ruled at 4.1, DQ-57).
          Resource:
            - !Sub arn:${AWS::Partition}:s3:::hkb-site-${AWS::AccountId}
            - !Sub arn:${AWS::Partition}:s3:::hkb-site-${AWS::AccountId}/*
        - Sid: SiteContentKey
          Effect: Allow
          Action:
            - kms:GenerateDataKey
            - kms:Decrypt
          Resource: !Sub arn:${AWS::Partition}:kms:*:${AWS::AccountId}:key/*
          Condition:
            StringEquals:
              aws:ResourceTag/Component: site
        - Sid: InvalidateSiteCache
          Effect: Allow
          Action:
            - cloudfront:CreateInvalidation
            - cloudfront:GetInvalidation
          Resource: !Sub arn:${AWS::Partition}:cloudfront::${AWS::AccountId}:distribution/*
          Condition:
            StringEquals:
              aws:ResourceTag/Component: site

Page information

Owner
Identity and Access
Status
current Current: generated from the templates and records in the repository at this build.
Generated from
baseline/hkb-baseline-iam.yaml
Linked from
Dev, Sandbox, Site distribution, Site distribution, Site distribution, Access and 2 more
Plain markdown
/wiki/roles/machines/hkb-pipeline-site-sync/index.md