You can build a Code Commit Pipeline with a CodeBuild
Job where you CodeCommit
repository has a SAM
Template like below and you run
sam build && sam deploy
From the codebuild
job.
AWSTemplateFormatVersion : '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: A sample SAM template for deploying Lambda functions.
Resources:
# Details about the myDateTimeFunction Lambda function
myDateTimeFunction:
Type: AWS::Serverless::Function
Properties:
Handler: myDateTimeFunction.handler
Runtime: nodejs12.x
# Creates an alias named "live" for the function, and automatically publishes when you update the function.
AutoPublishAlias: live
DeploymentPreference:
# Specifies the deployment configuration
Type: Linear10PercentEvery2Minutes
This documentation page describes the same CodeCommit Rolling deployments for Lambda functions
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…