aleios-cloud / aleios-cloud/sls-dev-tools

help request: not seeing any data in the "Server log"

Aberta
#415 0 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
JavaScript
Estrelas
871
Forks
45
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

Howdy,
This tool looks great! I'm just trying it out for the first time - sorry for the noob questions. I'm struggling to get cloudwatch logs to feed into `Server Log`. I've tried setting the `--start-time` but no dice. I can list the lambda, invoke it from sls-dev-tools (and see the result in `Dashboard Logs`), and see stats - but the data is not feeding through.

How can I debug it?

## What I've tried

- fiddling with start time
- `sls-dev-tools -r eu-west-2 -n sls-dev-tools-test-prod -t '10 September 2020 00:00 GMT'`
- deploying to different regions (none working): eu-west-2, us-west-1, af-south-1
- confirmed that cloudwatch logs are present = check
```sh
CWLOG=/aws/lambda/sls-dev-tools-test-prod-hello && aws logs describe-log-streams --log-group-name $CWLOG | jq -r .logStreams[].logStreamName | tr '\n' '\0' | xargs -0 -n1 aws logs get-log-events --log-group-name $CWLOG --log-stream-name | jq -j ".events[].message"
# returns logs correctly
```
- multiple sls-dev-tools versions:
- tried latest 2: 1.1.10 & 1.1.8

## More info on my environment

- lambda
- deployed using serverless
- regions: eu-west-2, us-west-1, af-south-1
- os
- Ubuntu 18.04.5 LTS
- serverless
- `Framework Core: 2.0.0. Plugin: 4.0.2, SDK: 2.3.1, Components: 3.1.2`
- node = v14.1.0

## lambda source

serverless.yml

```yaml
service: sls-dev-tools-test

provider:
name: aws
runtime: nodejs12.x
region: eu-west-2
stage: prod

functions:
hello:
handler: hello.get
```

hello.js

```js
exports.get = function (event, context, callback) {
console.log(JSON.stringify({ event, context }, null, 2));
const response = {
statusCode: 200,
body: JSON.stringify({
event,
context,
message: "hi world",
}),
};
callback(null, response);
};
```

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.