Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lambda return types through HTTP API Gateway - only json array or json object are working , else error 500 #118

Open
fxfire opened this issue Feb 27, 2021 · 3 comments

Comments

@fxfire
Copy link

fxfire commented Feb 27, 2021

I'd like to return binary data through the HTTP API Gateway (HTTP , NOT REST API!), but the response has to be a json object, always. Is there some workaround to make that happen like it is possible for the REST API ?

#include <aws/lambda-runtime/runtime.h>
using namespace aws::lambda_runtime;
static invocation_response my_handler(invocation_request const& req)
{
     return invocation_response::success("binarygoeshere", "application/zip");
}

int main()
{
    run_handler(my_handler);
    return 0;
}

^this returns error code 500

@MINIONBOTS
Copy link

Hey thanks for the reply. But as I wrote in my initial post, these settings are only possible in the offered REST API, not in the HTTP API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants