I'm not sure I understand the question. Do you want to set the process so that NiFi is agnostic to the credentials and just "saves data to S3", being told the credentials by the particular machine this flow is running on? Or embed the credentials in NiFi so that no matter which machine this flow is running on, it uses the same credentials? Both are possible.
Credentials provided by machine
You can populate the AWS credentials (Access Key and Secret Key) in three ways:
- Provide a file path for the Credentials File processor property pointing to a file on disk which contains these credentials.
- Populate the appropriate properties of the
PutS3Object
component using parameters.
- Create an
AWSCredentialsProviderControllerService
instance with those values and reference it from this processor
Whatever credentials are in the credentials file on disk, the parameter context, or the referenced controller service will be used. If the flow segment is deployed to a different NiFi instance (and the appropriate credentials file exists, or the parameters are populated, or the controller service populated [depending on the scenario]), those new values will be used.
Credentials embedded in NiFi flow
Either populate the AWS credentials (Access Key and Secret Key) in the appropriate properties of the PutS3Object
component, or create an AWSCredentialsProviderControllerService
instance with those values and reference it from this processor. If you deploy this flow to another NiFi instance, it will continue to use these same credentials.