AWS codeBuild / codePipeline with serverless card

I am trying to automate Pipeline for my application. Here is the automation architecture I came up with: Automation architecture

As you can see, I use codePipeline and codeBuild to automate my deployment. My server is based on the Serverless Framework , which deploys lambda functions when running a command sls deploy. For this reason, I did not use codeDeploy for traditional deployment. The file is buildspec.ymlas follows:

version: 0.1

phases:
  install:
    commands:
       apt-get -y update
       npm install -g serverless@1.9.0
  build:
    commands:
       cd nj2jp/serverless && npm install
  post_build:
    commands:
       serverless deploy –verbose

artifacts:
  files:
     serverless.yml
  discard-paths: yes

Now I have 3 questions regarding CodeBuild and without a server :

1: sls deploy config.yml, , db. git. , config.yml codeBuild?

2: AWS, EC2 codeDeploy. codeDeploy, serverless . codePipeline?

3: , Pull Request. , codePipeline. , Is Pull Request CodePipeline?

Hack Answers ( , . .)

1: config.yml S3 codeBuild pre-build . , , . ?

2: . .

3: , [APIGateway + Lambda + S3] codePipeline . , ​​ . - CodePipeline ?

+6
1

1

config.yml, - , , , .

, EC2, CodeBuild buildspec.yml. serverless.yml ${env:VARIABLE_NAME}.

config.yml. , direnv, .

2

, CodeBuild. , CodeDeploy. , Lambda , , CodeBuild.

3

CodePipelines , PR, , . API Gateway + Lambda + CodeBuild (No CodePipeline).

+3

All Articles