AWS Amplify, different build settings for different branches.AWS Amplify, different build settings for different branches.AWS Amplify, different build settings for different branches.AWS Amplify, different build settings for different branches.
  • HOME
  • BLOCKS
  • START
  • SUPPORT
    • Platform Status
    • Support Center
  • DEVELOPERS
  • Privacy Policy
  • Terms and Conditions
  • Terms of Service
  • Support Policy
English
MY ACCOUNT
✕
AWS ALB Health Check for multiples app or services on NGINX
February 8, 2022

AWS Amplify, different build settings for different branches.

August 20, 2022

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.

Share

@2009-2023, 23blocks Inc. Powered By 23blocks

Company


About Us
Study Cases
Team
Partners
Investors

Features


Infrastructure
DevOps
Instrumentation
Telemetry
Exchange

Developers


FAQs
Languages
Frameworks
Tools
Blog

Made With Blocks & Boulder, CO   Privacy Policy | Terms & Conditions   Version 3.0 - Production
MY ACCOUNT
English
  • No translations available for this page