Upload
yaml
type: "io.kestra.plugin.aws.s3.upload"
Examples
yaml
id: aws_s3_upload
namespace: company.team
inputs:
- id: bucket
type: STRING
defaults: my-bucket
- id: myfile
type: FILE
tasks:
- id: upload
type: io.kestra.plugin.aws.s3.Upload
region: "{{ secret('AWS_DEFAULT_REGION') }}"
accessKeyId: "{{ secret('AWS_ACCESS_KEY_ID') }}"
secretKeyId: "{{ secret('AWS_SECRET_KEY_ID') }}"
from: "{{ inputs.myfile }}"
bucket: "{{ inputs.bucket }}"
key: "path/to/file"
yaml
id: upload_file_to_s3
namespace: company.team
inputs:
- id: bucket
type: STRING
defaults: my-bucket
- id: file_url
type: STRING
defaults: https://wri-dataportal-prod.s3.amazonaws.com/manual/global_power_plant_database_v_1_3.zip
tasks:
- id: download_file
type: io.kestra.plugin.core.http.Download
uri: "{{ inputs.file_url }}"
- id: upload_to_s3
type: io.kestra.plugin.aws.s3.Upload
from: "{{ outputs.download_file.uri }}"
key: powerplant/global_power_plant_database.zip
bucket: "{{ inputs.bucket }}"
region: "{{ secret('AWS_DEFAULT_REGION') }}"
accessKeyId: "{{ secret('AWS_ACCESS_KEY_ID') }}"
secretKeyId: "{{ secret('AWS_SECRET_KEY_ID') }}"
yaml
id: upload_multiple_files_from_json_array
namespace: company.team
inputs:
- id: bucket
type: STRING
defaults: my-bucket
tasks:
- id: download_file1
type: io.kestra.plugin.core.http.Download
uri: "https://wri-dataportal-prod.s3.amazonaws.com/manual/global_power_plant_database_v_1_3.zip"
- id: download_file2
type: io.kestra.plugin.core.http.Download
uri: "https://wri-dataportal-prod.s3.amazonaws.com/manual/enhancing-adaptation-ambition-supplementary-materials.zip"
- id: upload_files_to_s3
type: io.kestra.plugin.aws.s3.Upload
from: |
[
"{{ outputs.download_file1.uri }}",
"{{ outputs.download_file2.uri }}"
]
key: "path/to/files"
bucket: "{{ inputs.bucket }}"
region: "{{ secret('AWS_DEFAULT_REGION') }}"
accessKeyId: "{{ secret('AWS_ACCESS_KEY_ID') }}"
secretKeyId: "{{ secret('AWS_SECRET_KEY_ID') }}"
yaml
id: upload_multiple_files_to_s3
namespace: company.team
inputs:
- id: bucket
type: STRING
defaults: my-bucket
tasks:
- id: download_file1
type: io.kestra.plugin.core.http.Download
uri: "https://wri-dataportal-prod.s3.amazonaws.com/manual/global_power_plant_database_v_1_3.zip"
- id: download_file2
type: io.kestra.plugin.core.http.Download
uri: "https://wri-dataportal-prod.s3.amazonaws.com/manual/enhancing-adaptation-ambition-supplementary-materials.zip"
- id: upload_multiple_to_s3
type: io.kestra.plugin.aws.s3.Upload
from:
- "{{ outputs.download_file1.uri }}"
- "{{ outputs.download_file2.uri }}"
key: "path/to/files"
bucket: "{{ inputs.bucket }}"
region: "{{ secret('AWS_DEFAULT_REGION') }}"
accessKeyId: "{{ secret('AWS_ACCESS_KEY_ID') }}"
secretKeyId: "{{ secret('AWS_SECRET_KEY_ID') }}"
Properties
bucket *Requiredstring
from *RequiredListstring
key *Requiredstring
accessKeyId string
acl string
bucketKeyEnabled booleanstring
cacheControl string
checksum string
checksumAlgorithm string
Possible Values
CRC32
CRC32_C
SHA1
SHA256
CRC64_NVME
UNKNOWN_TO_SDK_VERSION
compatibilityMode booleanstring
Default
false
contentDisposition string
contentEncoding string
contentLanguage string
contentLength integerstring
contentType string
endpointOverride string
expectedBucketOwner string
expires string
forcePathStyle booleanstring
metadata object
SubType string
objectLockLegalHoldStatus string
Possible Values
ON
OFF
UNKNOWN_TO_SDK_VERSION
objectLockMode string
Possible Values
GOVERNANCE
COMPLIANCE
UNKNOWN_TO_SDK_VERSION
objectLockRetainUntilDate string
region string
requestPayer string
secretKeyId string
serverSideEncryption string
Possible Values
AES256
AWS_FSX
AWS_KMS
AWS_KMS_DSSE
UNKNOWN_TO_SDK_VERSION
sessionToken string
storageClass string
Possible Values
STANDARD
REDUCED_REDUNDANCY
STANDARD_IA
ONEZONE_IA
INTELLIGENT_TIERING
GLACIER
DEEP_ARCHIVE
OUTPOSTS
GLACIER_IR
SNOW
EXPRESS_ONEZONE
FSX_OPENZFS
UNKNOWN_TO_SDK_VERSION
stsEndpointOverride string
stsRoleArn string
stsRoleExternalId string
stsRoleSessionDuration string
Default
PT15M
Format
duration
stsRoleSessionName string
tagging object
SubType string
Definitions
List keys of an S3 bucket.
bucket *Requiredstring
accessKeyId string
compatibilityMode booleanstring
delimiter string
encodingType string
endpointOverride string
expectedBucketOwner string
filter string
Default
BOTH
Possible Values
FILES
DIRECTORY
BOTH
forcePathStyle booleanstring
marker string
maxKeys integerstring
Default
1000
prefix string
regexp string
region string
requestPayer string
secretKeyId string
sessionToken string
stsEndpointOverride string
stsRoleArn string
stsRoleExternalId string
stsRoleSessionDuration string
Default
PT15M
Format
duration
stsRoleSessionName string
type object
io.kestra.plugin.aws.s3.models.FileInfo
contentLength integer
contentType string
eTag string
metadata object
SubType string
uri string
Format
uri