I have developed an AWS lambda function and I am testing it locally on my machine. To run the function locally, I use the following template.yml.
If I log short strings, then the logging works without problems. However, if I want to log longer JS objects, only a small snippet is displayed and not the full object. How can I display the whole object?
template.yml
Resources:
Function:
Type: AWS::Serverless::Function
Properties:
Timeout: 900
MemorySize: 128
Handler: index.handler
CodeUri: /.../
Runtime: nodejs16.x
Architectures:
- x86_64
Environment:
Variables:
Metadata:
SamResourceId: Function
const response = await axios.get(url);
console.log('test');
console.log(`${JSON.stringify(response)}`);
Logging response:
2023-07-29T11:50:02.629Z 8f7e4a8a-acad-4da9-ab7f-bca86e7a013a LOG test
--- property '_httpMessage' closes the circle