# API Gateway and Lambda Logs

**URL:** <https://discourse.sst.dev/t/api-gateway-and-lambda-logs/31>\
**Category:** Chapter Comments\
**Created:** [May 9, 2018, 6:39pm UTC](https://discourse.sst.dev/t/api-gateway-and-lambda-logs/31 "2018-05-09T18:39:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![anomalyinnovations](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/anomalyinnovations/32/10_2.png) [@anomalyinnovations](https://discourse.sst.dev/u/anomalyinnovations)\
**Post date:** [May 9, 2018, 6:39pm UTC](https://discourse.sst.dev/t/api-gateway-and-lambda-logs/31/1 "2018-05-09T18:39:08Z")

</div>

_From @jayair on Fri Oct 06 2017 22:39:05 GMT+0000 (UTC)_  
  
Link to chapter - [https://serverless-stack.com/chapters/api-gateway-and-lambda-logs.html](https://serverless-stack.com/chapters/api-gateway-and-lambda-logs.html)  
  
_Copied from original issue: [https://github.com/AnomalyInnovations/serverless-stack-com/issues/146](https://github.com/AnomalyInnovations/serverless-stack-com/issues/146)_

---

<div class="post-metadata">

**Author:** ![tstarkdk](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@tstarkdk](https://discourse.sst.dev/u/tstarkdk)\
**Post date:** [January 3, 2019, 1:31pm UTC](https://discourse.sst.dev/t/api-gateway-and-lambda-logs/31/2 "2019-01-03T13:31:54Z")

</div>

I can see the lambda logs in (as an example) /aws/lambda/notes-app-prod-list but in my transcations log: API-Gateway-Execution-Logs\_m9t5cs42s4/prod I always gets an “No events found” when I opens the first stream.

Any ideas to what I might be missing?

Kind regards.

---

<div class="post-metadata">

**Author:** ![tstarkdk](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@tstarkdk](https://discourse.sst.dev/u/tstarkdk)\
**Post date:** [January 4, 2019, 11:14am UTC](https://discourse.sst.dev/t/api-gateway-and-lambda-logs/31/3 "2019-01-04T11:14:16Z")

</div>

I’ve tried to redeploy the API after setting the cloudwatch, but with the same result.

---

<div class="post-metadata">

**Author:** ![tstarkdk](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@tstarkdk](https://discourse.sst.dev/u/tstarkdk)\
**Post date:** [January 4, 2019, 12:04pm UTC](https://discourse.sst.dev/t/api-gateway-and-lambda-logs/31/4 "2019-01-04T12:04:57Z")

</div>

The logs are starting to come in now. It might just have been some deplays.

---

<div class="post-metadata">

**Author:** ![jayair](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/jayair/32/9_2.png) [@jayair](https://discourse.sst.dev/u/jayair)\
**Post date:** [January 6, 2019, 3:57am UTC](https://discourse.sst.dev/t/api-gateway-and-lambda-logs/31/5 "2019-01-06T03:57:23Z")

</div>

Yeah there is a bit of a delay with the logs.

---

<div class="post-metadata">

**Author:** ![almeynman](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/almeynman/32/1191_2.png) [@almeynman](https://discourse.sst.dev/u/almeynman)\
**Post date:** [July 3, 2020, 11:58am UTC](https://discourse.sst.dev/t/api-gateway-and-lambda-logs/31/6 "2020-07-03T11:58:43Z")

</div>

I managed to enable logs as suggested in this post [API Gateway and Lambda Logs](https://discourse.sst.dev/t/api-gateway-and-lambda-logs/31/4) by adding 2 lines to serverless.yml:

```auto
provider:
  ...
  logs:
    restApi: true

```

Seems a lot easier than in the chapter, what are the downsides of this approach?

---

<div class="post-metadata">

**Author:** ![jayair](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/jayair/32/9_2.png) [@jayair](https://discourse.sst.dev/u/jayair)\
**Post date:** [July 12, 2020, 1:36am UTC](https://discourse.sst.dev/t/api-gateway-and-lambda-logs/31/7 "2020-07-12T01:36:29Z")

</div>

I haven’t looked into how they handle it internally. But this chapter was written back when this option wasn’t available. We’ll leave it up there in case somebody wants to know how to do it through the AWS Console.
