in use_cases/custom-cloud9-ssm/lib/index.ts [87:104]
public resizeEBSTo(size: number): void {
let steps: string = fs.readFileSync(CustomCloud9Ssm.RESIZE_STEP_FILE_NAME, 'utf8')
steps = steps.replace('{{ size }}', String(size))
// Add the resizing step
this.addDocumentSteps(steps)
// Grant permission to the EC2 instance to execute the statements included in the SSM Document
this.ec2Role.addToPolicy(new iam.PolicyStatement({
effect: iam.Effect.ALLOW,
actions: [
'ec2:DescribeInstances',
'ec2:ModifyVolume',
'ec2:DescribeVolumesModifications'
],
resources: ['*']
}))
}