This repository interfaces Service Discovery, in this instance CloudMap, in order to locate and communicate with different services. As opposed to storing ARN's in environment variables, this library will interface CloudMap to find a service by a user-friendly naming convention and will understand what 'type' of service you've requested and use the correct code to communicate/call that service.
- Lambda (
call
). - SNS (
publish
). - SQS (
queue
).
- Lambda (
request
). - SQS (
listen
). - Http (
request
|call
). - Fargate/ECS Task (
run
).
This library requires Python 3.5 and above.
from ais_service_discovery import call
response=call('namespace', 'service', 'handler', {<Payload>})
print(response)
from ais_service_discovery import call
response=call('namespace', 'service', 'handler', {<Payload>}, {'InvocationType': 'Event'})
print(response)