Skip to content

Instantly share code, notes, and snippets.

View swaminator's full-sized avatar
🎯
Focusing

Nikhil Swaminathan swaminator

🎯
Focusing
View GitHub Profile
@swaminator
swaminator / amplify.yml
Created May 26, 2023 06:40
empty amplify.yml
version: 1
frontend:
phases:
build:
commands: []
artifacts:
baseDirectory: /
files:
- '**/*'
cache:
@swaminator
swaminator / Monorepo.md
Last active October 30, 2020 14:12
Monorepo with Amplify CLI

Step 1: Set up your monorepo project

To get started, fork the following project.

git clone git@github.com:swaminator/monorepo-amplify.git

This project contains the frontend code for an angular and react Todo app. The repository has the following structure:

> monorepo-amplify
@swaminator
swaminator / intro.md
Last active November 2, 2022 06:32 — forked from gwryssekk/intro.md
AWS Amplify - Converting Existing Monorepos to the New Supported Model

It was recently announced that AWS Amplify now has built in support for monorepos. Customers who had previously used manual commands in their applications build settings are now able to trigger builds in various apps can now consolidate all of their app settings in a single file at the root of the repository.

Let's assume you have two Amplify apps - app1 and app2 that belong to your monorepo.

  1. If you have an amplify.yml file in your repo, rename it to amplify-old.yml to back it up.
  2. Go to the app1 in the Amplify console, App settings > build settings and update your buildspec to the new version. For example, a simple app with the following build spec:
version: 1
frontend:
@swaminator
swaminator / txt
Created November 27, 2018 21:44
Amplify Console - Trailing slashes
In the Amplify Console, navigate to Rewrites and redirects. Add the following depending on what you want:
Case 1:
Actual content location: /about/index.html
What user types in browser: /about/index.html
What user sees in browser: /about/
Configure in Amplify Console: /about/index.html /about/ 301
Case 2:
Actual content location: /about.html
@swaminator
swaminator / amplifyPush.sh
Last active December 28, 2019 02:37
The amplifyPush script
#!/usr/bin/env bash
set -e
IFS='|'
help_output () {
echo "usage: amplify-push <--environment|-e <name>> <--simple|-s>"
echo " --environment The name of the Amplify environment to use"
echo " --simple Optional simple flag auto-includes stack info from env cache"
exit 1
}