# InitSourceOptions

Additional options for an InitSource.

- Source: [`aws-ec2/lib/cfn-init-elements.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-ec2/lib/cfn-init-elements.ts#L894)

## Example

```ts
declare const myBucket: s3.Bucket;

const handle = new ec2.InitServiceRestartHandle();

ec2.CloudFormationInit.fromElements(
  ec2.InitFile.fromString('/etc/nginx/nginx.conf', '...', { serviceRestartHandles: [handle] }),
  ec2.InitSource.fromS3Object('/var/www/html', myBucket, 'html.zip', { serviceRestartHandles: [handle] }),
  ec2.InitService.enable('nginx', {
    serviceRestartHandle: handle,
  })
);
```

## Properties

- `serviceRestartHandles`: [InitServiceRestartHandle](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.InitServiceRestartHandle.html)[] — Restart the given services after this archive has been extracted.

  **Default:** Do not restart any service
