'Get APIs (rest and HTTP) from all AWS accounts

I would like to know if there's a way to get a list of all apis from aws accounts. I've been using SDK commands in a lambda but they only get the apis from the account I'm calling. When using CLI and using master's account information I get the answer I need but even using a lambda bash, doesn't work.

function handler () {
    EVENT_DATA=$1
    DATA=`/opt/awscli/aws apigatewayv2 get-apis`
    RESPONSE="{\"statusCode\": 200, \"body\": \"$DATA\"}"
    echo $RESPONSE
    echo $DATA
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source