ChrisSamo632 commented on a change in pull request #5504:
URL: https://github.com/apache/nifi/pull/5504#discussion_r762612941
##########
File path:
nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/s3/FetchS3Object.java
##########
@@ -148,6 +153,37 @@
return problems;
}
+ @Override
+ public List<ConfigVerificationResult> verify(ProcessContext context,
ComponentLog verificationLogger, Map<String, String> attributes) {
+ final List<ConfigVerificationResult> results = new
ArrayList<>(super.verify(context, verificationLogger, attributes));
+
+ final String bucket =
context.getProperty(BUCKET).evaluateAttributeExpressions(attributes).getValue();
+ final String key =
context.getProperty(KEY).evaluateAttributeExpressions(attributes).getValue();
+
+ final AmazonS3 client = getConfiguration(context).getClient();
+ final GetObjectRequest request = createGetObjectRequest(context,
attributes);
+
+ try (final S3Object s3Object = client.getObject(request)) {
Review comment:
Doing a full `GET` just to verify the processor seems a bit heavy handed
(if it's a large Object then it might also take a while and be costly for the
consumer both in terms of network bandwidth and the transfer fees from S3) -
could we use a `HEAD` instead to check whether the Object exists?
Would that add to the S3 policies needed for a user to run this Processor
though?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]