AWS SQS¶
Configuration¶
- In order to set up the SQS feedhandler, unzip the tar.gz or zip file and copy the contents of the folder into the
amione/libdirectory. - Two methods are supported (1) via STS, or (2) via Profiles for generating AWS credentials:
- STS: Ensure that both
ami.relay.fh.sqs.props.roleArnandami.relay.fh.sqs.props.roleSessionNameproperties are set. If either is unset, the feed handler will default to using profiles. Ensure that you have a role with read access to the relevant AWS SQS queue. Note: this method will use your default credentials to assume the provided role (see AWS Default Credentials Provider for more information on how this is acquired). - Profiles: Ensure that you have a valid AWS credential tagged to a profile configured with read access to the relevant AWS SQS queue (see Step 2 of: AWS SQS Setting Up). For configuring your profile for the first time, run
aws configure ssoand pass in the requested information to generate the required files and credentials for the SDK. Subsequently, runningaws sso login --profile profilenamewill refresh your credentials.
- STS: Ensure that both
- Add the respective properties to your local.properties file according to the section below.
Message Format¶
This feedhandler accepts only valid JSON as an input source from SQS and expects it to be in a single map where each key represents a column on a table and its value a single column value.
Sample valid message:
Note that by default, all column types are inferred to be Strings unless explicitly defined In the ami.relay.fh.sqs.props.tableMapping property using a colName=colType,... syntax.
Null values in the JSON message are skipped.
Valid types are as follows:
| Underlying Column Type | Valid Property Name (Case Insensitive) |
|---|---|
| String | str, string |
| Integer | int, integer |
| Short | short |
| Long | long |
| Float | float |
| Double | double |
| Character | char, character |
| Boolean | bool, boolean |