AWS CLI command isn't YAML valid


Hey everyone

So this is my command i’m trying to run

aws ec2 authorize-security-group-ingress --region <YOUR_REGION> --group-id 
<YOUR_SECURITY_GROUP_ID> --ip-permissions "[{\"IpProtocol\": \"tcp\", \"FromPort\": 
{\"CidrIp\": \"${public_ip_address}/32\"}]}]"

and here’s the error i’m getting :

Configuration errors: 2 errors occurred:

  • Error parsing config file: yaml: line 24: mapping values are not allowed in this context
  • Cannot find a job named build to run in the jobs: section of your configuration file.
    If you expected a workflow to run, check your config contains a top-level key called ‘workflows:’

After some investigation i’ve found that the --ip-permission argument is causing some troubles, the only thing is there’s no other way to add ip-permission via CLI ( it’s not possible to specify each arguments indepently, it has to be this kind of data structure, according to amazon doc )

is there any way to make this command YAML compliant ?

closed #2

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.