• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

marvinpinto / irc-hooky
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: disjoint-ca-projects
DEFAULT BRANCH: master
Repo Added 20 Jan 2016 09:28PM UTC
Files 17
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH fix-empty-payload-bug
branch: fix-empty-payload-bug
CHANGE BRANCH
x
Reset
  • fix-empty-payload-bug
  • add-documentation
  • atlas-packer-notifications
  • deployment-script
  • disjoint-ca-projects
  • fix-coverage-report
  • fix-docs
  • github-instructions
  • initial-setup
  • irchooky-demo
  • master
  • overview-documentation
  • pull-request-messages
  • s3-deploys
  • update-with-blog-post-link
  • v0.0.2
  • v0.0.4
  • v0.1.0
  • website-deploys

pending completion
79

push

travis-ci

marvinpinto
Fix for the empty payload bug

Ran into a situation where API Gateway would seemingly send an empty
payload into the Lambda function.

After shaving many AWS yaks (figuring out IAM roles, enabling logging on
all the things, etc) I tracked it down to the API Gateway Mapping
template.

Looking at the docs here:

http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html#input-variable-reference

You will notice that one of the examples is:

```
{
  "name" : "$input.params('name')",
  "body" : $input.json('$')
}
```

You will also notice that that is *not* valid JSON. This was the clue
for me.

I had assumed all along that the mapping template had to be valid json,
which was why using a function like `json.dumps` works and makes
sense!

In the end, it turns out that what I needed for the payload value was
indeed `$input.json('$')`, and this is why you will notice that
handcrafted artisanal "json like" mapping template.

363 of 363 relevant lines covered (100.0%)

1.0 hits per line

Relevant lines Covered
Build:
Build:
363 RELEVANT LINES 363 COVERED LINES
1.0 HITS PER LINE
Source Files on fix-empty-payload-bug
Detailed source file information is not available for this build.

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
79 fix-empty-payload-bug Fix for the empty payload bug Ran into a situation where API Gateway would seemingly send an empty payload into the Lambda function. After shaving many AWS yaks (figuring out IAM roles, enabling logging on all the things, etc) I tracked it down ... push 31 Jan 2016 07:14PM UTC marvinpinto travis-ci pending completion  
See All Builds (127)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc