Source code for ecs_composex.sqs.sqs_perms

#  -*- coding: utf-8 -*-
# SPDX-License-Identifier: MPL-2.0
# Copyright 2020-2021 John Mille <>

Set of functions to generate permissions to access queues
based on pre-defined SQS policies for consumers

from json import loads
from os import path

from ecs_composex.iam.import_sam_policies import import_and_cleanse_policies

[docs]def get_access_types(): sam_policies = import_and_cleanse_policies() with open( f"{path.abspath(path.dirname(__file__))}/sqs_perms.json", "r", encoding="utf-8-sig", ) as perms_fd: sqs_policies = loads( sam_policies.update(sqs_policies) return sam_policies
ACCESS_TYPES = get_access_types()