CompanionCompanion
Companion for Delivery
Companion for Business
Companion for Integration
Contact us
Log out
Companion for Delivery
Companion for Business
Companion for Integration
Contact us
  • Companion for Integration

    • Introduction
    • Getting Started
    • Configuration
    • Excel templating
    • How it works
  • YAML Configuration

    • Principles
    • Syntax
    • Validation
  • Custom Functions

    • Summary
    • arrayToJSON
    • bool
    • concatValueAndUnit
    • convertUnit
    • currentContextId
    • exportTime
    • eval
    • firstNonEmpty
    • getContextName
    • getEvents
    • getLastEventTime
    • getReferencesByAttributeGroup
    • getStoredValue
    • getWorkspaceId
    • hash
    • hasStoreKey
    • if
    • integer
    • join
    • mergeInheritedValues
    • multiValuesToJSON
    • number
    • nodeList
    • order
    • resolveUnitLabel
    • serializeAssetPushLocationsToJSON
    • serializeAttributeLinksToJSON
    • serializeContextReferenceToJSON
    • serializeContextReferencesToJSON
    • serializeContextValuesToJSON
    • serializeDataContainerToJSON
    • serializeDataContainersToJSON
    • serializeListOfValueValuesToJSON
    • serializeReferencesToJSON
    • serializeReferenceToJSON
    • serializeValuesToJSON
    • store
    • toXML
    • uppercase
  • Execution

    • Summary
    • Composite
    • From STEP
    • Standalone
    • Performance statistics
  • Configuration

    • ActiveMQ extension
    • Amazon AWS extension (SNS, SQS, Kinesis, S3)
    • ElasticSearch/OpenSearch extension
    • File extension (Excel, CSV, JSON, XML, JSONL, XMLL)
    • Kafka extension
    • Kafka Core extension
    • MongoDB/Cosmos DB extension
    • SQL extension
    • REST extension
    • Google Pub/Sub extension
  • c4i SaaS

    • Introduction
    • Managing jobs
    • Managing executions
    • Managing users
    • Changelog
  • Changelog

    • Core features changelog
    • ActiveMQ extension changelog
    • Amazon AWS extension changelog
    • Composite extension changelog
    • ElasticSearch extension changelog
    • File extension changelog
    • Kafka extension changelog
    • Kafka Core extension changelog
    • MongoDB/Cosmos DB extension changelog
    • SQL extension changelog
    • REST extension changelog
    • Google Pub/Sub extension changelog

Amazon AWS extension

Plugin ID

The plugin ID for Apache ActiveMQ is fr.cantor.c4i.AWSDelivery.

Properties

Environment independent parameters (set in extension configuration or properties file)

Property keyDescriptionMandatoryDefault value
configAssetIdThe ID of the asset containing the YAML mappingsYes
connectionThe name of the connection in the c4i.properties fileYes
prefixQueueNamesWithContextIdtrue or false to indicate whether or not to prefix the queue names with the context IDsYes
serviceSQS, SNS, S3 or KinesisYes
batchMessagesFor SNS/SQS/Kinesis, true will send message batches using the batching API, false will send messages one by one. For S3, true will produce objects containing multiple entries, false will produce one object for each entryYes
outputFormatJSON, or XMLYes
maxBatchSizeFor S3 OnlyNo
useIdAsDeduplicationIdtrue will send the message ID as deduplication ID. See belowNofalse
messageGroupIdThe Message Group ID that will be used for every messageOnly for fifo queues
delayMessage delay. -1 to ignoreNo-1
kinesis.partition.{streamName}Only for Kinesis. Indicates the partition key for each topicOnly for Kinesis
autoCreateTargetsOnly for S3. Automatically create the buckets if they don't exist. Otherwise, they must be created manuallyNofalse
cacheConfigThe ID of the asset containing the JCS configurationNo
displayPerfStattrue to display performance statistics (see Performance statistics dedicated page)Nofalse

Environment dependent parameters (set in centralized c4i.properties file)

Property keyDescriptionMandatoryDefault value
accessKeyAWS Access KeyYes
secretKeyAWS Secret Key only in Standalone modeYes
regionThe region where the SQS/SNS queues are definedYes
mappings.{key}Use this parameter to map targets names to SQS queues URL, SNS topics ARN, Kinesis stream name, or any replacement when templating S3 targets. See belowOnly for SNS
bucketNameThe bucket nameOnly for S3

Configuration example

Message Deduplication ID

Fifo queues that do not use content-based deduplication require messages to contain a Deduplication ID. If the parameter useIdAsDeduplicationId is set to true,

Then the fields identified as the message key will be sent as the Deduplication ID.

  • If only one field is mapped, the Deduplication ID will be this single field value.
  • If multiple fields are mapped, the Deduplication ID will be a serialized JSON document containing the key-values pairs.

Important: These fields will not be part of the produced message. If you wish to add them to the message as well, you will need to map them twice

Example

Given the following XML:

<STEP-ProductInformation ContextID="GL">
    <Product ID="PRD1">
        <Name>Test Product</Name>
    </Product>
</STEP-ProductInformation>

The following example illustrates simple keys:

The following example illustrates complex keys:

The following example illustrates how to include the key in the message:

S3 output templating

When sending data to S3, you can define the output path for the produced objects using templating.

The following properties are automatically defined by C4i :

PropertyValue
contextIDThe Context ID from the STEP XML file
exportTimeThe timestamp of the STEP XML file in seconds
keyThe value for the mapped key from the YAML configuration file

You can add your own properties using the environment parameter mappings.{key}

Example input

Given the following input STEP XML file:

<STEP-ProductInformation ContextID="GL" ExportTime="2025-12-04 14:58:59">
    <Products>
        <Product ID="PRD001" UserTypeID="PROD_ARTICLE"><Name>Product 1</Name></Product>
        <Product ID="PRD002" UserTypeID="PROD_ARTICLE"><Name>Product 2</Name></Product>
    </Products>
</STEP-ProductInformation>

And the following c4i.properties file

s3.bucketName=mycompany-prd-products
s3.mappings.env=prd

Example 1 : One object per entry

In this example, we set the parameter batchMessages to false.

Given the following YAML configuration file:

- Product[@UserTypeID="PROD_ARTICLE"]:
    ${key}-${contextId}-${exportTime}[key]:
      - ./@ID : key
      - ./@ID : id
      - Name/text() : name
      - ./@UserTypeID : objectType

Will produce the following JSON files, stored at the paths PRD001-GL-1764858043.json and PRD002-GL-1764858043.json of the mycompany-prd-products bucket:

{
  "id": "PRD001",
  "name": "Product 1",
  "objectType": "PROD_ARTICLE"
}

and

{
  "id": "PRD002",
  "name": "Product 2",
  "objectType": "PROD_ARTICLE"
}

Example 2 : One object containing a JSON array

In this example, we set the parameter batchMessages to true.

Given the following YAML configuration file:

- Product[@UserTypeID="PROD_ARTICLE"]:
    ${env}-products-${contextId}-${exportTime}:
      - ./@ID : id
      - Name/text() : name
      - ./@UserTypeID : objectType

Will produce the following JSON file, stored at the path prd-products-GL-1764858043.json of the mycompany-prd-products bucket:

[
  {
    "id": "PRD001",
    "name": "Product 1",
    "objectType": "PROD_ARTICLE"
  },
  {
    "id": "PRD002",
    "name": "Product 2",
    "objectType": "PROD_ARTICLE"
  }
]

Example 2 : One object containing a JSON object

In this example, we set the parameter batchMessages to true.

Given the following YAML configuration file:

- Product[@UserTypeID="PROD_ARTICLE"]:
    ${env}-products-${contextId}-${exportTime}#products:
      - ./@ID : id
      - Name/text() : name
      - ./@UserTypeID : objectType

Will produce the following JSON file, stored at the path prd-products-GL-1764858043.json of the mycompany-prd-products bucket:

{
  "products": [
    {
      "id": "PRD001",
      "name": "Product 1",
      "objectType": "PROD_ARTICLE"
    },
    {
      "id": "PRD002",
      "name": "Product 2",
      "objectType": "PROD_ARTICLE"
    }
  ]
}
Last Updated: 6/5/26, 9:38 AM
Prev
ActiveMQ extension
Next
ElasticSearch/OpenSearch extension