Skip to content

What is proper syntax for 'rdk modify --tags' json argument

0

Trying to apply tags to AWS Config custom rule using RDK. Docs show the following but can't find any examples actual syntax. --tags [optional] JSON for tags to be applied to all CFN created resources.

Tried:

  • rdk modify MFA_ENABLED_RULE --tags '{"Site":"Chicago"}', but 'deploy' threw 'Invalid type for parameter Tags, value: {'Site': 'Chicago'}, type: <class 'dict'>, valid types: <class 'list'>, <class 'tuple'>'
  • 'rdk modify MFA_ENABLED_RULE --tags '{"Key":"Site","Value":"Chicago"}'', but 'deploy' threw 'Invalid type for parameter Tags, value: {'Site': 'Chicago'}, type: <class 'dict'>, valid types: <class 'list'>, <class 'tuple'>'
AWS
asked 2 years ago197 views
1 Answer
1

The error messages indicate that the --tags parameter expects a list or tuple of dictionaries, where each dictionary contains Key and Value pairs for the tags. Here is the correct syntax for using the --tags parameter with rdk modify:

rdk modify MFA_ENABLED_RULE --tags '[{"Key": "Site", "Value": "Chicago"}]'

In this command, the --tags parameter is provided with a JSON array (list) containing a single dictionary with Key and Value pairs for the tag. This should be accepted by the RDK deploy command without throwing any errors.

EXPERT
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.