AWS C++ Route53 Unknown(100) errors

  amazon-route53, amazon-web-services, c++

I’m trying to query a hosted zone on AWS with the C++ SDK and its not giving me error messages I can use (UNKNOWN/100/No message). I have dumped the request as well and don’t see anything obviously wrong with it.

Any help on where I might look for a problem?

// note: The zone_id has been pulled correctly earlier in the code
Aws::String zone_id = "(set previously)";
auto type = Model::RRType::A;

// List records 
{
    auto lrrs = Model::ListResourceRecordSetsRequest();
    lrrs.SetHostedZoneId(zone_id);
    lrrs.SetStartRecordType(type);
    auto outcome = route53->ListResourceRecordSets(lrrs);
    if (outcome.IsSuccess())
    {
        std::cout << "LRRS workedn";
        auto result = outcome.GetResult().GetResourceRecordSets();
        for (auto &r : result)
        {
            std::cout << r.GetName() << ":"
                      << r.GetTTL() << ":"
                      << static_cast<char>(r.GetType()) << std::endl;
        }
    }
    else
    {
        std::cerr << "LRRS failed: "
                  << static_cast<int>(outcome.GetError().GetErrorType())
                  << std::endl
                  << outcome.GetError()
                  << std::endl;
    }
}

This is the error I end up with when I run it:

LRRS failed: 100
HTTP response code: 400
Resolved remote host IP address: 55.146.15.201
Request ID: 
Exception name: 
Error message: No response body.
3 response headers:
connection : close
content-length : 0
date : Sun, 30 May 2021 01:50:29 GMT

I have tried all sorts of combinations on how to construct the query but with no luck. Any help would be much appreciated!

Source: Windows Questions C++

LEAVE A COMMENT