简体   繁体   中英

Lambda development in AWS -? develop locally? or use AWS web console

How do people develop usually? Do they use something like serverless or use AWS Lambda ( web console on AWS Platform).

I am facing challenges with testing on local especially simulating the SQS triggerring of Lambda, and SES. I am developing an eco system where an API will send a message to SQS. SQS will trigger a Lambda function, and this function will send out a customer registration email.

Look into node-lambda . It makes it easy to develop/test locally and then deploy to AWS.

One thing to note is that your .env file will contain your AWS settings such as lambda config, memory, etc. Then you can create deploy.env which will contain any ENVs for your lambda to use. If you run node-lambda setup , those env files will be created for you.

This is what my scripts looks like in my package.json :

"scripts": {
    "start": "NODE_ENV=dev node-lambda run --configFile deploy.env",
    "deploy": "node-lambda deploy --configFile deploy.env"
 }

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