Following stack will create:
- Test and Production S3 buckets with website hosting
- CodeCommit repository
- CodeBuild projects with buildspec for master and development branch
- CodePipelines for test and production
- Hello world lambda function
There are few prerequisites that we need to take care of before we start and those are:
- serverless pro account
- aws profile
- CodeCommit credentials generated inside AWS IAM
- Clone ServerlessGuru templates repository
- Copy sls-frontend-with-cicd to your project folder
- Login to your serverless dashboard then create an app.
- Go to the apps section, then click on your application name
- On the right side of the screen, click on the three dots, then click on a settings
- Click on your default profile and there you will see the form where you can add parameters.
- Create the following parameters:
- repositoryName
- testBucket
- productionBucket
- Update
serverless.yml
fileapp
andorg
properties with your organization and application name - run
./deploy.sh YOUR_REGION YOUR_AWS_PROFILE react|vue|angular
from your terminal
Example: ./deploy us-east-1 default vue