Create a configuration file for AWS SQS settings
sudo vi etc/opennms.properties.d/aws-sqs.properties
Configure AWS SQS
org.opennms.core.ipc.rpc.strategy=sqs(1)
org.opennms.core.ipc.sink.strategy=sqs(2)
org.opennms.core.ipc.sink.initialSleepTime=60000(3)
org.opennms.core.ipc.aws.sqs.sink.FifoQueue=false(4)

org.opennms.core.ipc.aws.sqs.aws_region=us-east-1(5)
org.opennms.core.ipc.aws.sqs.aws_access_key_id=my-access-key(6)
org.opennms.core.ipc.aws.sqs.aws_secret_access_key=my-secret-access-key(7)
1 Use AWS SQS for remote procedure calls (RPC).
2 Use AWS SQS as message sink.
3 Ensure that messages are not consumed from Kafka until the system has fully initialized. Default is 60 seconds.
4 If you require consistent ordering of incoming messages, you can use FIFO queues. Default is false and must match the Minion setting.
5 Set AWS SQS region.
6 The AWS SQS access key.
7 The AWS SQS secret for the access key.

The default credential provider chain looks for credentials in the following order:

  1. Environment variables (such as AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY).

  2. Java system properties (such as aws.accessKeyId and aws.secretKey). Add these keys to ${OPENNMS_HOME}/etc/opennms.conf).

  3. Default credential profiles file (for example, ~/.aws/credentials).

  4. Amazon ECS container credentials (for example, AWS_CONTAINER_CREDENTIALS_RELATIVE_URI).

  5. Instance profile credentials (such as through the metadata service when running on EC2).

Apply the changes with Horizon Core instance restart
sudo systemctl restart opennms
When OpenNMS Horizon runs inside AWS, you can use the default provider chain with an IAM role to avoid hard coding the AWS credentials on a configuration file. The following shows an example of the role to associate with the EC2 instance on which OpenNMS is going to run.
aws iam role

You can find available configuration parameters in the Amazon Simple Queue Service.