Iniesta provides an extensive list of configurations for its behavior. All Iniesta settings are prefixed with INIESTA
and are loaded into Insanic's settings on initialization.
If you have read through the Getting Started <getting_started>
documentation, there are some mandatory configurations for Iniesta to function properly.
This is arguably the most important as it determines how Iniesta will be running. The value should be a tuple of strings with the values being:
SNS_PRODUCER
EVENT_POLLING
QUEUE_POLLING
CUSTOM
A combination of the above values can be set and Iniesta will run accordingly. More information is provided in their respective initialization type documentations.
type_event_polling
type_producer
type_queue_polling
type_custom
If you have initialized Iniesta with either SNS_PRODUCER
and/or EVENT_POLLING
, this value becomes required.
When "publishing" messages, Iniesta needs the topic arn to publish its messages to.
When polling for events, Iniesta needs it to verify that all the necessary AWS resources and permissions have been created.
This is the list of events that Iniesta should be expecting. It should be a list of strings that represent the events.
Some examples could be:
"UserCreated.user"
: To only receive the literal event."PostCreated.*"
: To receive allPostCreated
events regardless of who produced it.
Because of AWS filter policy restrictions, only prefixes can be filtered for. Currently Iniesta only provides values for exact matching or prefix filtering.
For more information view the AWS Filter Policy Documentation for more information.
This is the string value of the key of the event. This is essentially the key that is set in the filter policies, with the event as the value.
The default SQS queue that Iniesta should be polling. If not set it fallbacks to INIESTA_SQS_QUEUE_NAME_TEMPLATE
, where the templates is iniesta-{env}-{service_name}
(e.g. iniesta-development-user
).
There are 3 configs that will need to be set for Iniesta to communicate with AWS APIs.
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION
If for example you have separate access keys and secrets from the default you can prefix INIESTA_
and Iniesta will take those over the ones without the prefix.
AWS_*
from the environment.INIESTA_AWS_*
from Insanic's settings.AWS_*
from Insanic's settings.
The loaded variables can be access from iniesta.sessions.BotoSession
. These are the values that Iniesta uses through the package.
iniesta.config