简体   繁体   中英

Run Golang exec on AWS lambda

I'm developing tools in Golang that should run on AWS-Lambda in production. For developing and debuging/maintenance convenient I writing the tools as CLI tools. This way I or any of my teammates can develop the tools without dependencies with AWS-Lambda env.

My goal is to integrate these tools with the AWS-lambda environment with the minimum changes of the original code (the CLI-tools).

I'm thinking of two options:

  1. Write a wapper for AWS-lambda that using exec command to run the tools.
  2. Export the core-code of the tool to a shared function.

The first option is more convenient and straightforward.

I'm wondering what is the impact of the exec commnad on the performance on low-price servers like AWS-lambda?

I use Serverless Framework or AWS Serverless SAM to run and test AWS Lambda code locally, don't necessarily need to use for deployments etc.. Both are compatible with Golang. They are easy to use and setup. These frameworks will help avoid overhead of creating wrappers to run code locally.

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