Adding a Condition to a Policy in AWACs

147 views
Skip to first unread message

Amanda Ruby

unread,
Feb 8, 2021, 6:27:58 PM2/8/21
to cloudtools-dev
Hi all, I'm trying to add a Condition--and therefore a ConditionElement--to an IAM role's policy.  The issue is, the ConditionElement calls for the use of the StringEquals, which no longer appears to be in the codebase.  Is this whole class deprecated?  Are Conditions just not supported by AWACs?  Thanks in advance.

Mark Peek

unread,
Feb 8, 2021, 9:03:50 PM2/8/21
to Amanda Ruby, cloudtools-dev
Hi Amanda,
Is this example the same use case you're referring to?

Mark

On Mon, Feb 8, 2021 at 3:28 PM Amanda Ruby <amand...@nytimes.com> wrote:
Hi all, I'm trying to add a Condition--and therefore a ConditionElement--to an IAM role's policy.  The issue is, the ConditionElement calls for the use of the StringEquals, which no longer appears to be in the codebase.  Is this whole class deprecated?  Are Conditions just not supported by AWACs?  Thanks in advance.

--
You received this message because you are subscribed to the Google Groups "cloudtools-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cloudtools-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloudtools-dev/1ca08d3c-e1b0-47cd-bf2f-25fcaef3cd2bn%40googlegroups.com.

Amanda Ruby

unread,
Feb 9, 2021, 9:37:03 AM2/9/21
to Mark Peek, cloudtools-dev
Yes, that's the one!  But StringEquals does not appear to be importable anymore.

--
Amanda Ruby
Software Engineer, Data Governance

Mark Peek

unread,
Feb 9, 2021, 9:53:49 AM2/9/21
to Amanda Ruby, cloudtools-dev
Here's what I'm seeing with a clean virtual environment with just awacs installed:

$ . env/bin/activate
(env) $ python
Python 3.8.6 (default, Oct  8 2020, 14:06:32)
[Clang 12.0.0 (clang-1200.0.32.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from awacs.aws import StringEquals
>>> import awacs
>>> awacs.__version__
'1.0.2'
>>>

Can you try the above and let me know what you're seeing?

Thanks,
Mark

Reply all
Reply to author
Forward
0 new messages