Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#118 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
aws, cpp
Domain
api, cloud

Research direction

Start with invocation_response::success and the run_handler path shown in the example, then trace how the response is serialized for HTTP API Gateway. Check whether existing response-serialization tests cover non-JSON payloads. Done means establishing and testing a supported way for binary data with content type application/zip to avoid the HTTP 500 response.

Written by the indexing model from the issue text.

Description

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

Dominant language
C++
Stars
465
Forks
98
Avg merge
1h 16m
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from awslabs/aws-lambda-cpp

All issues in awslabs/aws-lambda-cpp

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.