Skip to content

Commit 9bd440b

Browse files
hsohail94Sohail-Haaris-bah
authored andcommitted
fix: Add launch permissions for given accounts in AMI Distribution Configuration
1 parent 2627662 commit 9bd440b

File tree

4 files changed

+252
-191
lines changed

4 files changed

+252
-191
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,9 @@ export class ImagePipeline extends Construct {
247247
Name: `${props.imageRecipe}-${distributionRegion}-{{imagebuilder:buildDate}}`,
248248
Description: `copy AMI ${props.imageRecipe} to ${distributionRegion}`,
249249
TargetAccountIds: props.distributionAccountIDs,
250+
LaunchPermissionConfiguration: {
251+
UserIds: props.distributionAccountIDs,
252+
},
250253
},
251254
};
252255
distributionsList.push(distributionConfig);

test/imagepipeline.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,9 @@ test('Infrastructure Configuration is built with provided EBS volume properties'
169169
Name: 'TestImageRecipe-us-east-1-{{imagebuilder:buildDate}}',
170170
Description: 'copy AMI TestImageRecipe to us-east-1',
171171
TargetAccountIds: ['111222333444'],
172+
LaunchPermissionConfiguration: {
173+
UserIds: ['111222333444'],
174+
},
172175
},
173176
}],
174177
});

0 commit comments

Comments
 (0)