简体   繁体   中英

Read local JSON file from AWS lambda

I am trying a read a static json file which has cloudwatch logs in it and that same json file is stored on my local machine, now i want to write a lambda function which will read that json file and fetch the logs as output

If you package your log file with your lambda code (or add it in the AWS console to the lambda), you will be able to access it directly.

Then you can open it with the usual usage of open.

Another option will be to use S3 and boto3.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM