September 27, 2018

AWS CI CD - 3rd Workflow - Serverless Application Deployments

3rd Workflow in AWS CI CD using AWS Developer Tools Lab Series is about Serverless Application Deployment that can be taken-up independently as the material have been scripted from scratch with step by step instructions.  AWS CodeCommit, AWS CodeBuild, AWS CodeDeploy & AWS CodePipeline

Serverless Application is one or more Lambda functions, which is basically a compute service, and has triggering events like CloudWatch, S3 or DynamoDB etc, associated with a Lambda function. Deploying of Lambda functions along with all of the associated resources, as a bundle is termed as serverless deployments


Serverless Application is one or more Lambda functions, which is basically a compute service, and has triggering events like CloudWatch, S3 or DynamoDB etc, associated with a Lambda function. Deploying of Lambda functions along with all of the associated resources, as a bundle is termed as serverless deployments


Serverless Application is one or more Lambda functions, which is basically a compute service, and has triggering events like CloudWatch, S3 or DynamoDB etc, associated with a Lambda function. Deploying of Lambda functions along with all of the associated resources, as a bundle is termed as serverless deployments
Serverless Application Deployment


  • In this workflow, a simple Lambda function using python is sourced from Codecommit repository, configured to ‘Codebuild’ service, for compiling and unit testing phase and then based on the buildpsec.yml(which is input for codebuild) the code repo for Lambda, is packaged and zipped into the relevant S3 bucket location configured
  • Based on the application framework chosen, JUnit, Unittest or other tests can be configured to run in CodeBuild stage
  • ‘aws cloudformation package’ specified in build phase of buildspec.yml converts the SAM template into CloudFormation for Create or replace stack
  • SAM template is basically an extension of Cloudformation template and only difference between these two is the ‘AWS Transform: serverless’ in SAM template, which defines the Lambda specific instructions
  • Next, a ‘Manual approval’ stage with the SNS topic is configured. The approver will get notified via email with a link to ‘Approve or Reject’
  • Once approved, the Cloudformation ‘Execute change set’ action is triggered from next stage, which actually creates all resources bundled with Lambda
  1. LAB 9: Prerequisites Setup
    1. Create IAM Group & User
    2. Create CloudWatch Log group named codedeploy_logs
    3. Create S3 Bucket named demo-4-codedeploy
          Cross-verify the configurations defined in the LAB 9 against the below mind-map.
  2. LAB 10: Setup Repository in AWS CodeCommit
       
    Cross-verify the configurations defined in the LAB 10 against the below mind-map.
  3. LAB 11: Setup a Build in AWS CodeBuild
        Cross-verify the configurations defined in the LAB 11 against the below mind-map.
  4. LAB 12: Create a pipeline using AWS CodeDeploy
        Cross-verify the configurations defined in the LAB 12 against the below mind-map.
  5. LAB 13: Create a pipeline using AWS CodePipeline
        Cross-verify the configurations defined in the LAB 13 against the below mind-map.
  6. View AWS CI CD - Serverless Application Deployments Workflow

No comments:

Post a Comment