Integration / Apache NiFi Interview Questions
How does NiFi integrate with cloud storage services like Amazon S3?
NiFi provides a comprehensive set of processors for integrating with Amazon S3 available in the nifi-aws-nar extension.
ListS3: Lists objects in an S3 bucket (filtered by prefix and last modified date). Produces one FlowFile per S3 object with attributes: s3.bucket, s3.key, filename, s3.etag, s3.contentType, file.size, s3.lastModified. Uses State Management to track listed objects and emit only new or changed ones on subsequent runs.
FetchS3Object: Downloads the S3 object specified by the s3.bucket and s3.key attributes on an incoming FlowFile. Used downstream from ListS3.
PutS3Object: Uploads FlowFile content to S3. Supports configuring bucket, key (EL-supported: ${now():format('yyyy/MM/dd')}/${filename}), storage class (STANDARD, INTELLIGENT_TIERING, GLACIER), server-side encryption (AES-256, AWS:KMS), and multipart upload threshold for large files.
DeleteS3Object: Deletes an S3 object. TagS3Object: Adds or updates S3 object tags.
Authentication is handled via an AWSCredentialsProviderControllerService — supporting static credentials, environment variable resolution, EC2 instance profile (IAM role), and AWS credentials file. Using IAM roles via instance profiles is the recommended approach for deployments on EC2 or EKS, avoiding static credential management entirely.
More Related questions...