When i run the below command on aws-cli its throws an error 'returning Unknown options : awsvpcConfiguration'
e.g
aws ecs run-task --cluster test-ecs-cluster --task-definition testtask --launch-type FARGATE --network-configuration awsvpcConfiguration={subnets=["subnet-1234","subnet-12345"],securityGroups=["test"],assignPublicIp="DISABLED"}
i got the below error:
Unknown options: awsvpcConfiguration=securityGroups=[test], awsvpcConfiguration=assignPublicIp=DISABLED, awsvpcConfiguration=subnet-1234]
Yes, because the way you specified it the AWS CLI interprets it a the parameter itself. But it's the parameter's value that is awsvpcConfiguration
so this should work:
aws ecs run-task \
--cluster test-ecs-cluster \
--task-definition testtask \
--launch-type FARGATE
--network-configuration "awsvpcConfiguration={subnets=['subnet-1234','subnet-12345'],securityGroups=['test'],assignPublicIp='DISABLED'}"
Background: awsvpcConfiguration
is, as per the CLI docs a shorthand syntax, not a valid parameter (or: option) of the run-task
command.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With