I need to develop a cloud formation template that will do following:
1. Deploy the Lambda that supports node.js and the DynamoDB Table.
2. Configure the CI/CD pipeline for the Lambda(the codebuild spec is ready)
3. S3 should be created in the Target Acount.(this done already in the code build spec script)
4. Authenticate CodePipeline to Deploy to the Lambda from the Source Account to Target Account(this done already in the code build spec script) (using role input param)
5. Source Account would be the Shared Services Account where we will have the CI/CD Pipeline.
6. Once the Developer Updates the Code in GitLab, an SNS should trigger an EAMIL to the owner of the Project to Approve triggering the CI/CD Pipeline
7. Artifacts should be stored on S3. A Slack Notification (Email) should be sent out to Project Team on the build packages and the staging environment it was published from.
8. for automated testing , we should run npm test command , which would run test cases written by developer and send success of failure message to Slack. If it succeeds we should proceed to build and go to point 9, else log the error in file and mark build as failed
9. Package needs to be verified and Approved (the notification should go to Slack) for deployment now by the Project Owner.
10. CodeDeploy which is a part of CodePipeline shall now do the deployment.
11. Success of the Pipeline should be emailed to Product Team.
Input Parameters for the CFT:
• CloudFormation Name -> Should be specific to the Product Team.
• Lambda Function Name -> Should be specific to the Product Team.
• CI/CD Pipeline Name -> Should be specific to Product Team.
• Input the account and region in which the S3 should be created.
• Input the name of the S3 bucket.
• Target Account ID & Region -> The Account ID to which the CI/CD pipeline will deploy the Lambda and DynamoDB.
• The ARN of the Role that will permit the Shared Source Account (Services Account) to Deploy the Lambda and Dynamo to Target Account.
• Slack Webhook (Email ID) of the Project Owner to Approve CI/CD pipeline for integration and deployment.
• Slack WebHook (Email ID) of the Project Team.
• Input the VPC for the Lambda
• Input the Subnet for the Lambda
• Input the Security group for the Lambda
• Input the Subnet for DynamoDB
• Input the Security Group for DynamoDB
• Input the CPU & RAM that should be allocated for the Lambda Function for each of the environments