To create a route in a route table that is attached to a VPC you must have the route table id and the internet gateway (if you want to give public access) the CIDR block.
The command used for doing that is as follows:-
C:\Users\priyj_kumar>aws ec2 create-route --route-table-id rtb-05f48298823c9731d --destination-cidr-block 0.0.0.0/0 --gateway-id igw-0185c098195ba1d1a
This will return true if the route was created successfully.
{
"Return": true
}
This way you can create a route to allow all traffic. Hope this helps.