Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

See Stream using Amazon S3 Functions - Acme EV for an example how the Amazone S3 collector and forwarder can be used in a stream.

Anchor
common
common
Common Configurations

For both functions, you need to configure AWS Credentials and File location.

AWS Credentials

The AWS Credentials can either be specified directly in the configuration dialog for the functions, or in an AWS Secret in the Secrets Wallet, and must contain:

Setting

Description

Access Key

The identifier used to sign the requests sent to Amazon S3, is referenced by S3 as the Access Key ID

Secret Key

The Secret Key is used in conjunction with the Access Key to cryptographically sign Amazon AWS requests. When you create the Access Key in Amazon S3 you can view and download the Secret Key. S3 references this as the Secret Access Key.

File location

The File location settings include:

Setting

Description

Bucket

The Bucket is the public cloud storage resource available in Amazon S3.

Folder

Enther the path to the folder you want to collect data from and push data to when using the Amazon S3 functions in this field.

Note

Note!

If the path to the folder is not specified, the root folder of the Amazon S3 bucket is selected by default.

Anchor
AWSS3Collector
AWSS3Collector
Amazon S3 Collector Configuration

With the Amazon S3 Collector you can collect data from your AWS S3 bucket for processing in your stream.

...

Note

Note!

During collection, the following applies:

  • Compressed files are automatically decompressed.

  • The type of archive file format is automatically identified based on the contents of the file instead of the file extension. The supported archive file formats are ZIP, gzip and zlib.

For all supported archive file types, the following applies:

  • The archive must contain only a single file that is compressed.

  • The archive must not contain any directories.

There are exceptions to the filename patterns when it comes to collector functions. 

Anchor
AWSS3Forwarder
AWSS3Forwarder
Amazon S3 Forwarder

With the Amazon S3 Forwarder function you can send data to an Amazon S3 bucket from your stream.

...

  1. In Output file Information section, specify how you want to handle the output file(s) in Filename options:

Filename option

Action

Collector filename

Select this option if you want to keep the same filename as on the input file(s).

Custom filename

Select this option to define a new filename for the output files, see Configuring Dynamic Naming in Fields for information on how to define file names with additional flexibilit

...

You have now configured the Amazon S3 Forwarder function.

Anchor
S3metadata
S3metadata
Amazon S3 Metadata

You can view and access the following metadata properties of Amazon S3. To view the metadata, see information on the meta object in the Script function documentation.

Property name

Description

fileName

Name of the file.

Syntax
Code Block
log.info(meta.fileName);

filePath

Path from where the file is collected. The file can be either in the Excel or CSV format.

Path format: bucket/folder/file

Syntax
Code Block
log.info(meta.filePath);

fileSize

Size (in bytes) of the file.

Syntax
Code Block
log.info(meta.fileSize); 

sheetName

Name of the sheet of the Excel file.

Syntax
Code Block
log.info(meta.sheetName);

collectionTime

Timestamp when the file is collected.

Syntax
Code Block
log.info(meta.collectionTime); 

...