1

I have written the below code in Python under the import statements in the lambda.py file while developing the custom skill in the Alexa developer console.

logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
logger.info("The logger information")

The testing runs fine without errors, but I unable to view the log information.

Balaji Ambresh
  • 4,977
  • 2
  • 5
  • 17
  • 1
    Where do you expect to see those logs? Have you checked CloudWatch? – slawciu Jul 01 '20 at 08:13
  • 1
    https://stackoverflow.com/questions/37703609/using-python-logging-with-aws-lambda – slawciu Jul 01 '20 at 08:15
  • @slawciu I've been trying to use cloudwatch but everytime I click on the Logs: Amazon CloudWatch from the lambda function in the alexa developer console > code. It automatically logs me out of my aws account and logs in with **VoiceHubSSORole** account in which it states: `Log group does not exist`, three months back when I first created my account I was able to use cloudwatch, my lambda function automatically creates a log group, but now it doesn't, please help me through this. – Chiru Harshith Jul 02 '20 at 05:51
  • 1
    Strange. Have you tried clear the session/cache/localstorage in your web browser? – slawciu Jul 02 '20 at 08:39
  • yes, @slawciu I'm positive about that, please see the two different skills I'm referring to, this was the skill I've created 4 months ago and the cloud watch logs are working fine: [link](https://ibb.co/DzhzLYh) , This is the new skill I've created recently but the logs are not working as expected: [link](https://ibb.co/stFYBxP), the Logs: Amazon CloudWatch is what redirecting me to that page [link](https://ibb.co/3YmrHPL). – Chiru Harshith Jul 03 '20 at 06:15

1 Answers1

0

I had a similar issue. I'm not sure if this is your issue too but my problem was that 1) my developer account used the same email as my AWS account but AFAIK, they're actually not connected, and 2) I was looking at the wrong region in CloudWatch. My skill was in Virginia but I was looking at logs in Oregon.

DeeR.
  • 1
  • 1