Skip to content

Commit caee051

Browse files
authored
Fix sfn deployment (#1158)
* fixed sfn deploy role * fixed typo * changed assume role policy * another typo * remove bootstrap version rule
1 parent 9478471 commit caee051

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

src/core/cdk/src/initial-setup.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,24 @@ export namespace InitialSetup {
200200
new iam.ServicePrincipal('codebuild.amazonaws.com'),
201201
new iam.ServicePrincipal('lambda.amazonaws.com'),
202202
new iam.ServicePrincipal('events.amazonaws.com'),
203-
new iam.ArnPrincipal(roleArn),
204203
),
205204
managedPolicies: [iam.ManagedPolicy.fromAwsManagedPolicyName('AdministratorAccess')],
206205
maxSessionDuration: buildTimeout,
207206
});
208207

208+
pipelineRole.assumeRolePolicy?.addStatements(
209+
new iam.PolicyStatement({
210+
effect: iam.Effect.ALLOW,
211+
principals: [new iam.AccountPrincipal(stack.account)],
212+
actions: ['sts:AssumeRole'],
213+
conditions: {
214+
ArnLike: {
215+
'aws:PrincipalARN': `arn:aws:iam::${stack.account}:role/${roleName}`,
216+
},
217+
},
218+
}),
219+
);
220+
209221
// S3 working bucket
210222
const s3WorkingBucket = new s3.Bucket(this, 'WorkingBucket', {
211223
blockPublicAccess: s3.BlockPublicAccess.BLOCK_ALL,

src/installer/cdk/cdk.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
{
2-
"app": "pnpx ts-node src/index.ts"
3-
}
2+
"app": "pnpx ts-node src/index.ts",
3+
"context": {
4+
"@aws-cdk/core:newStyleStackSynthesis": false
5+
}
6+
}

0 commit comments

Comments
 (0)