what is the --rest-api-id and --resource-id and where do i find them?

Your rest-api-id is the identifier before 'execute-api' in your endpoint URL.

In your example URL:

https://abc123.execute-api.us-east-1.amazonaws.com/MyStage/

The rest-api-id is abc123

The resource ID can be obtained with the CLI using the get-resources call and the rest-api-id:

> aws apigateway get-resources --rest-api-id abc123
{
"items": [
    {
        "id": "xxxx1",
        "parentId": "xxxx0",
        "pathPart": "foo",
        "path": "/foo",
        "resourceMethods": {
            "GET": {}
        }
    },
    {
        "id": "xxxx0",
        "path": "/"
    }
]}

Each one of the records in the items attribute is a resource, and its id attribute is a resource ID you can use in your test-invoke-method in conjunction with a method that is associated with the resource.

Both values are visible at the top of the console when you select one of your endpoints/resources: enter image description here