File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -207,6 +207,15 @@ async function createDemoInstanceProfile(iam, cfg) {
207207
208208 await iam . send ( new PutRolePolicyCommand ( { RoleName : roleName , PolicyName : 'osis-ingest' , PolicyDocument : ingestPolicy } ) ) ;
209209
210+ // Attach SSM managed policy for debugging access
211+ const { AttachRolePolicyCommand } = await import ( '@aws-sdk/client-iam' ) ;
212+ try {
213+ await iam . send ( new AttachRolePolicyCommand ( {
214+ RoleName : roleName ,
215+ PolicyArn : 'arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore' ,
216+ } ) ) ;
217+ } catch ( e ) { /* already attached */ }
218+
210219 try {
211220 await iam . send ( new CreateInstanceProfileCommand ( { InstanceProfileName : profileName , Tags : tags ( cfg . pipelineName ) } ) ) ;
212221 await iam . send ( new AddRoleToInstanceProfileCommand ( { InstanceProfileName : profileName , RoleName : roleName } ) ) ;
You can’t perform that action at this time.
0 commit comments