Defining S3 Exist File Jobs
This job allows you to check if a file exists on the S3 bucket.
If the file that you have defined does not exist in the bucket, the Exist File Job does not fail.
This page includes the following:
S3 Exist File Job Parameters
On the Exist File Job section, you define the parameters relevant to run that job on the S3 system from Automic Automation.
Some fields allow you to open a picker dialog from where you can select the file and the bucket. By default, only 200 entries are displayed. If the relevant file or bucket is not displayed among those 200, please type in the relevant name on the Search field to narrow down the list.
-
Connection
Select the S3 Connection object containing the relevant information to connect to the Simple Storage Service system.
To search for a Connection object, start typing its name to limit the list of the objects that match your input.
-
Region
Defining the region in the job is optional and only relevant for AWS. If you choose not to define it, the job takes the URL defined in the Connection object.
However, if you decide to define the region in the job, make sure that the definition matches the one defined in the Connection object that you have selected for the job. If both region definitions do not match, the job execution fails and an error message is logged in both, the Agent (PLOG) and the Job (REP) reports (see Monitoring S3 Jobs).
-
Bucket Name
Define the bucket name in which to check if the file exists. You can click the browse button to the right of the field to open a picker dialog where you can select the relevant name.
-
File Name
Define the name of the file to be watched on the bucket. The file name definition is case sensitive. You can specify the exact name or write a regular expression.
-
Use Regex
Select this checkbox if you want to use regular expressions rather than the exact name of the file in the File Name field. If you do so, the job will return multiple file names.
After executing the job, the number of returned files is displayed in &FILES_COUNT in the Object variables section of the Details pane. You find this pane in the Process Monitoring perspective in the Executions lists and in the Tasks list.
Examples:
Aut.*.txt: An asterisk (*) stands for any number of characters; therefore, the regex searches for text files starting with Aut and ending with .txt with any number of characters where the * is located, such as Automic.txt.
tes.?.txt: A question mark (?) stands for a single character; therefore, the regex searches for text files with 4-character names starting with tes and ending with .txt with a single in the position where the ? is located.
Note:If the Use Regex checkbox is not selected, any special characters (?, *) used are considered standard characters and part of the name string.
-
Retrieve File Names
(Available only when you select Use Regex)
If you select this option, the name of the files that match the regular expression (that is, the files found by the job) are also printed to the job Report (REP) in a format that is easily parsed. Regardless of what you set here, the files that are found by the job are also listed in the Agent log (PLOG) report.
Note: If you select Use Regex and do NOT select Retrieve File Names, the job Report (REP) will be empty even if the regular expression finds matches. In this case, you can still find the file names in the Agent log (PLOG) report.
-
Query Param
Allows you to filter the query and therefore the query response.
Examples
When using a regex, the prefix parameter allows you to optimize the search and get results that are more efficient. For example, if your bucket has the following files:
/opt/files/example_04_08.pdf
/opt/files/example_05_08.pdf
/opt/files/example_06_08.pdf
/opt/files/demo_07_08.pdf
/opt/files/demo_08_08.pdf
If you want to check for files starting with example and with a .pdf extension, you can specify .*.pdf on the File Name field and enable the Use Regex option.
You can further specify the query using the following query parameter:
prefix=/opt/files/example.
You can also send multiple query parameters using the format <param1>=<value1>&<param2>=<value2>.
For example, you can add the list-type=2 parameter to use version 2 of the AWS API operation:
prefix=/opt/files/example&list-type=2
The Pre-Process page allows you to define the settings all S3 Jobs using script statements. These statements are processed before the Schedule Job is executed, see Setting S3 Job Properties Through Scripts.
AWS S3 Server-Side Encryption Parameters
Amazon S3 encrypts your objects at their destination as it writes them in the respective AWS S3 data center and decrypts them when you access them. You can set a default encryption configuration for your buckets. However, you can also override the default bucket encryption and define a different one per object to be stored in an AWS S3 bucket.
You can only apply one type of server-side encryption to an object at the time.
If the file that you want to check was originally uploaded to the bucket using a custom encryption type (SSE-C), you need to provide an algorithm and a key to be able to check its existence.
If the file that you want to download was uploaded to the bucket using either SSE-S3, SSE-KMS, or DSSE-KMS encryption keys, you do not need to define any parameters.
Specify Encryption Key Allows you to define that you want to use a custom server-side encryption, when the file that you want to download was uploaded using custom encryption.
Select the check box to define the following parameters:
-
Customer Algorithm: AES256 is the only supported algorithm.
-
Customer Key: Enter the encryption key that you want to use to execute the job.
See also: