PutS3Object

Description:

Puts FlowFiles to an Amazon S3 Bucket. The upload uses either the PutS3Object method or the PutS3MultipartUpload method. The PutS3Object method sends the file in a single synchronous call, but it has a 5GB size limit. Larger files are sent using the PutS3MultipartUpload method. This multipart process saves state after each step so that a large upload can be resumed with minimal loss if the processor or cluster is stopped and restarted. A multipart upload consists of three steps: 1) initiate upload, 2) upload the parts, and 3) complete the upload. For multipart uploads, the processor saves state locally tracking the upload ID and parts uploaded, which must both be provided to complete the upload. The AWS libraries select an endpoint URL based on the AWS region, but this can be overridden with the 'Endpoint Override URL' property for use with other S3-compatible endpoints. The S3 API specifies that the maximum file size for a PutS3Object upload is 5GB. It also requires that parts in a multipart upload must be at least 5MB in size, except for the last part. These limits establish the bounds for the Multipart Upload Threshold and Part Size properties.

Additional Details...

Tags:

Amazon, S3, AWS, Archive, Put

Properties:

In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values, whether a property supports the NiFi Expression Language, and whether a property is considered "sensitive", meaning that its value will be encrypted. Before entering a value in a sensitive property, ensure that the nifi.properties file has an entry for the property nifi.sensitive.props.key.

NameDefault ValueAllowable ValuesDescription
Object Key${filename}No Description Provided.
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
BucketNo Description Provided.
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
Content TypeSets the Content-Type HTTP header indicating the type of content stored in the associated object. The value of this header is a standard MIME type. AWS S3 Java client will attempt to determine the correct content type if one hasn't been set yet. Users are responsible for ensuring a suitable content type is set when uploading streams. If no content type is provided and cannot be determined by the filename, the default content type "application/octet-stream" will be used.
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
Content Disposition
  • inline
  • attachment
Sets the Content-Disposition HTTP header indicating if the content is intended to be displayed inline or should be downloaded. Possible values are 'inline' or 'attachment'. If this property is not specified, object's content-disposition will be set to filename. When 'attachment' is selected, '; filename=' plus object key are automatically appended to form final value 'attachment; filename="filename.jpg"'.
Cache ControlSets the Cache-Control HTTP header indicating the caching directives of the associated object. Multiple directives are comma-separated.
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
Access Key IDNo Description Provided.
Sensitive Property: true
Supports Expression Language: true (will be evaluated using variable registry only)
Secret Access KeyNo Description Provided.
Sensitive Property: true
Supports Expression Language: true (will be evaluated using variable registry only)
Credentials FilePath to a file containing AWS access key and secret key in properties file format.

This property requires exactly one file to be provided..
AWS Credentials Provider ServiceController Service API:
AWSCredentialsProviderService
Implementation: AWSCredentialsProviderControllerService
The Controller Service that is used to obtain aws credentials provider
Object Tags PrefixSpecifies the prefix which would be scanned against the incoming FlowFile's attributes and the matching attribute's name and value would be considered as the outgoing S3 object's Tag name and Tag value respectively. For Ex: If the incoming FlowFile carries the attributes tagS3country, tagS3PII, the tag prefix to be specified would be 'tagS3'
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
Remove Tag Prefixfalse
  • True
  • False
If set to 'True', the value provided for 'Object Tags Prefix' will be removed from the attribute(s) and then considered as the Tag name. For ex: If the incoming FlowFile carries the attributes tagS3country, tagS3PII and the prefix is set to 'tagS3' then the corresponding tag values would be 'country' and 'PII'
Storage ClassStandard
  • DeepArchive
  • Glacier
  • GlacierInstantRetrieval
  • IntelligentTiering
  • OneZoneInfrequentAccess
  • Outposts
  • ReducedRedundancy
  • Standard
  • StandardInfrequentAccess
No Description Provided.
Regionus-west-2
  • AWS GovCloud (US) AWS Region Code : us-gov-west-1
  • AWS GovCloud (US-East) AWS Region Code : us-gov-east-1
  • US East (N. Virginia) AWS Region Code : us-east-1
  • US East (Ohio) AWS Region Code : us-east-2
  • US West (N. California) AWS Region Code : us-west-1
  • US West (Oregon) AWS Region Code : us-west-2
  • EU (Ireland) AWS Region Code : eu-west-1
  • EU (London) AWS Region Code : eu-west-2
  • EU (Paris) AWS Region Code : eu-west-3
  • EU (Frankfurt) AWS Region Code : eu-central-1
  • EU (Stockholm) AWS Region Code : eu-north-1
  • EU (Milan) AWS Region Code : eu-south-1
  • Asia Pacific (Hong Kong) AWS Region Code : ap-east-1
  • Asia Pacific (Mumbai) AWS Region Code : ap-south-1
  • Asia Pacific (Singapore) AWS Region Code : ap-southeast-1
  • Asia Pacific (Sydney) AWS Region Code : ap-southeast-2
  • Asia Pacific (Jakarta) AWS Region Code : ap-southeast-3
  • Asia Pacific (Tokyo) AWS Region Code : ap-northeast-1
  • Asia Pacific (Seoul) AWS Region Code : ap-northeast-2
  • Asia Pacific (Osaka) AWS Region Code : ap-northeast-3
  • South America (Sao Paulo) AWS Region Code : sa-east-1
  • China (Beijing) AWS Region Code : cn-north-1
  • China (Ningxia) AWS Region Code : cn-northwest-1
  • Canada (Central) AWS Region Code : ca-central-1
  • Middle East (Bahrain) AWS Region Code : me-south-1
  • Africa (Cape Town) AWS Region Code : af-south-1
  • US ISO East AWS Region Code : us-iso-east-1
  • US ISOB East (Ohio) AWS Region Code : us-isob-east-1
  • US ISO West AWS Region Code : us-iso-west-1
No Description Provided.
Communications Timeout30 secsNo Description Provided.
Expiration Time RuleNo Description Provided.
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
FullControl User List${s3.permissions.full.users}A comma-separated list of Amazon User ID's or E-mail addresses that specifies who should have Full Control for an object
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
Read Permission User List${s3.permissions.read.users}A comma-separated list of Amazon User ID's or E-mail addresses that specifies who should have Read Access for an object
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
Write Permission User List${s3.permissions.write.users}A comma-separated list of Amazon User ID's or E-mail addresses that specifies who should have Write Access for an object
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
Read ACL User List${s3.permissions.readacl.users}A comma-separated list of Amazon User ID's or E-mail addresses that specifies who should have permissions to read the Access Control List for an object
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
Write ACL User List${s3.permissions.writeacl.users}A comma-separated list of Amazon User ID's or E-mail addresses that specifies who should have permissions to change the Access Control List for an object
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
Owner${s3.owner}The Amazon ID to use for the object's owner
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
Canned ACL${s3.permissions.cannedacl}Amazon Canned ACL for an object, one of: BucketOwnerFullControl, BucketOwnerRead, LogDeliveryWrite, AuthenticatedRead, PublicReadWrite, PublicRead, Private; will be ignored if any other ACL/permission/owner property is specified
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
SSL Context ServiceController Service API:
SSLContextService
Implementations: StandardSSLContextService
StandardRestrictedSSLContextService
Specifies an optional SSL Context Service that, if provided, will be used to create connections
Endpoint Override URLEndpoint URL to use instead of the AWS default including scheme, host, port, and path. The AWS libraries select an endpoint URL based on the AWS region, but this property overrides the selected endpoint URL, allowing use with other S3-compatible endpoints.
Supports Expression Language: true (will be evaluated using variable registry only)
Signer OverrideDefault Signature
  • Default Signature
  • Signature v4
  • Signature v2
The AWS libraries use the default signer but this property allows you to specify a custom signer to support older S3-compatible services.
Multipart Threshold5 GBSpecifies the file size threshold for switch from the PutS3Object API to the PutS3MultipartUpload API. Flow files bigger than this limit will be sent using the stateful multipart process. The valid range is 50MB to 5GB.
Multipart Part Size5 GBSpecifies the part size for use when the PutS3Multipart Upload API is used. Flow files will be broken into chunks of this size for the upload process, but the last part sent can be smaller since it is not padded. The valid range is 50MB to 5GB.
Multipart Upload AgeOff Interval60 minSpecifies the interval at which existing multipart uploads in AWS S3 will be evaluated for ageoff. When processor is triggered it will initiate the ageoff evaluation if this interval has been exceeded.
Multipart Upload Max Age Threshold7 daysSpecifies the maximum age for existing multipart uploads in AWS S3. When the ageoff process occurs, any upload older than this threshold will be aborted.
Temporary Directory Multipart State${java.io.tmpdir}Directory in which, for multipart uploads, the processor will locally save the state tracking the upload ID and parts uploaded which must both be provided to complete the upload.
Supports Expression Language: true (will be evaluated using variable registry only)
Server Side EncryptionNone
  • None
  • AES256
Specifies the algorithm used for server side encryption.
Encryption ServiceController Service API:
AmazonS3EncryptionService
Implementation: StandardS3EncryptionService
Specifies the Encryption Service Controller used to configure requests. PutS3Object: For backward compatibility, this value is ignored when 'Server Side Encryption' is set. FetchS3Object: Only needs to be configured in case of Server-side Customer Key, Client-side KMS and Client-side Customer Key encryptions.
Use Chunked Encodingtrue
  • true
  • false
Enables / disables chunked encoding for upload requests. Set it to false only if your endpoint does not support chunked uploading.
Use Path Style Accessfalse
  • true
  • false
Path-style access can be enforced by setting this property to true. Set it to true if your endpoint does not support virtual-hosted-style requests, only path-style requests.
Proxy Configuration ServiceController Service API:
ProxyConfigurationService
Implementation: StandardProxyConfigurationService
Specifies the Proxy Configuration Controller Service to proxy network requests. If set, it supersedes proxy settings configured per component. Supported proxies: HTTP + AuthN
Proxy HostProxy host name or IP
Supports Expression Language: true (will be evaluated using variable registry only)
Proxy Host PortProxy host port
Supports Expression Language: true (will be evaluated using variable registry only)
Proxy UsernameProxy username
Supports Expression Language: true (undefined scope)
Proxy PasswordProxy password
Sensitive Property: true
Supports Expression Language: true (undefined scope)

Dynamic Properties:

Dynamic Properties allow the user to specify both the name and value of a property.

NameValueDescription
The name of a User-Defined Metadata field to add to the S3 ObjectThe value of a User-Defined Metadata field to add to the S3 ObjectAllows user-defined metadata to be added to the S3 object as key/value pairs
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)

Relationships:

NameDescription
successFlowFiles are routed to success relationship
failureFlowFiles are routed to failure relationship

Reads Attributes:

NameDescription
filenameUses the FlowFile's filename as the filename for the S3 object

Writes Attributes:

NameDescription
s3.bucketThe S3 bucket where the Object was put in S3
s3.keyThe S3 key within where the Object was put in S3
s3.contenttypeThe S3 content type of the S3 Object that put in S3
s3.versionThe version of the S3 Object that was put to S3
s3.exceptionThe class name of the exception thrown during processor execution
s3.additionalDetailsThe S3 supplied detail from the failed operation
s3.statusCodeThe HTTP error code (if available) from the failed operation
s3.errorCodeThe S3 moniker of the failed operation
s3.errorMessageThe S3 exception message from the failed operation
s3.etagThe ETag of the S3 Object
s3.contentdispositionThe content disposition of the S3 Object that put in S3
s3.cachecontrolThe cache-control header of the S3 Object
s3.uploadIdThe uploadId used to upload the Object to S3
s3.expirationA human-readable form of the expiration date of the S3 object, if one is set
s3.sseAlgorithmThe server side encryption algorithm of the object
s3.usermetadataA human-readable form of the User Metadata of the S3 object, if any was set
s3.encryptionStrategyThe name of the encryption strategy, if any was set

State management:

This component does not store state.

Restricted:

This component is not restricted.

Input requirement:

This component requires an incoming relationship.

System Resource Considerations:

None specified.

See Also:

FetchS3Object, DeleteS3Object, ListS3