"""SQS.""" from functools import cache import json import boto3 from src import config @cache def get_sqs_client(): """Get SQS client.""" return boto3.client('sqs', config.AWS_REGION) def send_message(queue_url, body): """Send message.""" return get_sqs_client().send_message( QueueUrl=queue_url, MessageBody=json.dumps(body) ) def add_to_store_product_queue(msg_input): """Send a store-product-queue SQS message.""" return send_message( config.SQS_STORE_PRODUCT_QUEUE_URL, msg_input )