Created
April 18, 2023 08:25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const targetPolicy = new PolicyDocument({ | |
statements: [ | |
new PolicyStatement({ | |
resources: [targetStepFunction.stateMachineArn], | |
actions: ["states:StartExecution"], | |
effect: Effect.ALLOW, | |
}), | |
], | |
}); | |
const sourcePolicy = new PolicyDocument({ | |
statements: [ | |
new PolicyStatement({ | |
resources: [soureTable.tableStreamArn!], | |
actions: [ | |
"dynamodb:DescribeStream", | |
"dynamodb:GetRecords", | |
"dynamodb:GetShardIterator", | |
"dynamodb:ListStreams", | |
], | |
effect: Effect.ALLOW, | |
}), | |
], | |
}); | |
const pipeRole = new Role(this, "role", { | |
assumedBy: new ServicePrincipal("pipes.amazonaws.com"), | |
inlinePolicies: { | |
sourcePolicy, | |
targetPolicy, | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment