AWS ALB Health Check for multiples app or services on NGINX
February 8, 2022AWS Amplify, different build settings for different branches.
Using AWS Amplify there are cases when you want to use different build settings per branch, however, as all the branches share the same build file, it could be somehow confusing.
Case
To go around that unique build file for all branches, we are using variables and if instructions, we ended up having a config like this for one of our projects.
Solution
frontend:
phases:
build:
commands:
- if [ "${AWS_BRANCH}" = "production" ]; then ng build --configuration=production --prod --build-optimizer; fi
- if [ "${AWS_BRANCH}" = "stage" ]; then ng build --configuration=stage --prod --build-optimizer; fi
this way we can have multiple environments, with different build instructions and different URLs, from multiples branches, using only one Amplify configuration.
Now, that works great on a single account environment or during Proof of Concepts, once is a real project, we would need different accounts for each environment, but that’s for another day.
Do you have an idea and want to make a prototype to see if it is functional or sustainable over time? Then, 23blocks is the best solution that you will find to carry out this development with less effort and investment.
Each of our blocks is a combination of Software, Infrastructure, and Services, which are available as API Microservices. According to industry standards, these are hosted in a highly available cloud, ready for production and use.
Making the decision to start a software project can be complicated and intimidating. So, contact us at info@23blocks.com to receive free assistance from our software experts and get started on your idea.
There is a better way to build apps and platforms —the #23blocksway.