简体   繁体   中英

Testing AWS lambdas using Python

We have AWS lambdas written in Python and I need to test them. We'll be using API gateway, S3 and other services for building the application.

SNS will trigger the lambdas. I've some basic knowledge of Python and I'm able to invoke the lambdas using boto3. I've heard of package moto to mock S3 and other services but do we need all code locally to use this package?

Could you please suggest the best strategy for testing? Should we test them locally if yes then how can we do that?

It will be really nice if you can give any reference or example.

Thanks a lot!

Regards, Sunil

you can test your lambda locally using serverless or SAM CLI ,

Find more information here SAM CLI , Serverless

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