Deploying the application code

Once you are in the state of code iteration and redeployment, you'll want to make that loop as short as possible. To accomplish this, specifying the function name when doing the deployment step goes through the process of uploading your Lambda function, but skips the CloudFormation update. In my experience, this results in deployments that are typically low single-digit seconds:

# serverless deploy function -s $ENV -f $FUNCTION_NAME

I can hear you thinking, what about doing deployments to a production system that is serving live traffic? Behind the scenes, AWS Lambda is using container technology to respond to events. During a deployment, any Lambda invocations continue doing their jobs as instructed. At a certain ...

Get Serverless Design Patterns and Best Practices now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.