interface S3DownloadOptions
| Language | Type name | 
|---|---|
|  .NET | Amazon.CDK.AWS.EC2.S3DownloadOptions | 
|  Java | software.amazon.awscdk.services.ec2.S3DownloadOptions | 
|  Python | aws_cdk.aws_ec2.S3DownloadOptions | 
|  TypeScript (source) | @aws-cdk/aws-ec2»S3DownloadOptions | 
Options when downloading files from S3.
Example
import { Asset } from '@aws-cdk/aws-s3-assets';
declare const instance: ec2.Instance;
const asset = new Asset(this, 'Asset', {
  path: './configure.sh'
});
const localPath = instance.userData.addS3DownloadCommand({
  bucket:asset.bucket,
  bucketKey:asset.s3ObjectKey,
  region: 'us-east-1', // Optional
});
instance.userData.addExecuteFileCommand({
  filePath:localPath,
  arguments: '--verbose -y'
});
asset.grantRead(instance.role);
Properties
| Name | Type | Description | 
|---|---|---|
| bucket | IBucket | Name of the S3 bucket to download from. | 
| bucket | string | The key of the file to download. | 
| local | string | The name of the local file. | 
| region? | string | The region of the S3 Bucket (needed for access via VPC Gateway). | 
bucket
Type:
IBucket
Name of the S3 bucket to download from.
bucketKey
Type:
string
The key of the file to download.
localFile?
Type:
string
(optional, default: Linux   - /tmp/bucketKey
Windows - %TEMP%/bucketKey)
The name of the local file.
region?
Type:
string
(optional, default: none)
The region of the S3 Bucket (needed for access via VPC Gateway).
