AWS Amplify arrives in Console with CI/CD pipeline
AWS has introduced Amplify as a service in the console. All these days I knew that Amplify is a framework through which I can create and manage serverless Apps and it basically resides in CLI or as a dependency in nodejs and needs to be called from code.
Silently it got introduced in AWS console as a service.
When I played around with it. The functionality happens to be pretty intuitive.
- In the console click on Connectapp button
- Select your repository (There are multiple options to choose from which includes GitHub, GitLab, BitBucket, AWS Code Commit, there seems to be also an option to deploy without a Git Provider
- One we choose GitHub as the repo, the console will take you to the authentication page of GitHub , once you authorize it will allow you to select the repo you want to deploy.
4. Select any repo and select the master branch of that repo
5. Once you click next Amplify will auto-detect the build settings, Here you can change the build settings and implement any pre and post-deploy hooks. Introduce and environment variable.
6. It will also ask for a role for the amplify to deploy the application
7. After this, you can save the configuration and deploy the app
Amplify will do all the heavy lifting if you are leaving all the default settings it will do the following
- Provision S3 bucket
- Create the configuration for static website hosting, all the policies for the bucket
- Create a role to deploy in the S3 bucket
- Run the build script and create all the artifacts
- Inject hooks or environment variables
- Deploy the artifacts in the bucket
- Verify some vitals of the application
Once the application is deployed correctly you can see the link to navigate to the url to see the application.
Next, if you clone the repository in your local which you just deployed and change something and then do a commit and push it to the GitHub , Amplify will pickup the commit hook and start a new build to deploy the application in S3 bucket. So you will have your own CI/CD pipeline with a very minimalistic effort.
AWS like other services has spun out a lot of features in Amplify, and surely we can expect a lot more features within the console. Do checkout AWS Amplify documentation https://aws-amplify.github.io/docs/js/start and there Git repo to keep your self-updates. Any discussion with Amplify cannot happen without Nadir Dabit . As his tutorial and gitrepo are Bibel for discussion. I used his youtube tutorial for this.