Skip to content

Instantly share code, notes, and snippets.

@monken
Last active February 23, 2019 00:25
Show Gist options
  • Save monken/a81c4bf5cbffba2496f04be4b0095b8c to your computer and use it in GitHub Desktop.
Save monken/a81c4bf5cbffba2496f04be4b0095b8c to your computer and use it in GitHub Desktop.
lake-create-table
Resources:
CrossAccountAccessRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Statement:
Action: sts:AssumeRole
Effect: Allow
Principal:
AWS: '123412341234' # data lake account id
ManagedPolicyArns:
- arn:aws:iam::aws:policy/service-role/AWSGlueServiceRole
OnTimePerformance:
Type: Custom::Table
Properties:
ServiceToken: !Sub arn:aws:sns:${AWS::Region}:123412341234:lake
SourceTable: flights.ontimeperformance # database and name of the table in the lake
TargetTable: default.ontimeperformance # destination database and name of the table
RoleArn: !GetAtt CrossAccountAccessRole.Arn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment