Skip to content
v2.274.0

InitSourceOptions Struct ​

Additional options for an InitSource.

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 ​

serviceRestartHandlesInitServiceRestartHandle[]service_restart_handlestyping.List[InitServiceRestartHandle]serviceRestartHandlesList<InitServiceRestartHandle>ServiceRestartHandlesInitServiceRestartHandle[]ServiceRestartHandles*[]InitServiceRestartHandle= Do not restart any service#
Restart the given services after this archive has been extracted.