Gunnerfy is a set of convenience commands that wrap the AWS (CLI, AppSync and Amplify), Serverless Framework, React and Expo and assist in the setup and workflow of a serverless platform in a multi-developer team, leveraging AWS best practices.
If you are not familiar with the above technology stack, Gunnerfy is not for you.
Setup is based off of this starter template
Please check out our usage videos
Install the following
- Brew:
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" - Python:
$ brew install python; brew upgrade python - AWS CLI or
$ brew install awscli; brew upgrade awscli - Setup your aws cli if you haven't:
aws configure - Git
- NVM
- Node:
nvm install 12
$ nvm use 12
$ npm install gunnerfy -g
$ gunnerfy new <project-name> -o <organization-name>
Allow gunnerfy to create a new group for each environment.
This gives developers fine-grained access to the different environments, i.e., developers can only access their environment and not the staging, production environments.
$ gunnerfy new sample-project -o SampleClient
$ gunnerfy new sample-project -o SampleClient -s staging
$ gunnerfy new sample-project -o SampleClient -s production
If you only want one group created for all the environments in the project, pass a group name to the command.
This will create fewer groups, but each environment will be in one group, meaning a developer in the group will have access to all of the environments.
$ gunnerfy new sampleProject -o SampleClient -g sampleProjectGroup
$ gunnerfy new sampleProject -o SampleClient -s staging -g sampleProjectGroup
$ gunnerfy new sampleProject -o SampleClient -s production -g sampleProjectGroup
When you create the project in sentry, make sure you use the exact <project-name> as the project name
- Create a new project
- Note the url (i.e. https://xxxxxxxxx@sentry.io/xxxxx)
gunnerfy set-var -n sentry-url -v <url>
- Dev requests access to
<base-stage>from team lead (where pull requests are submitted, i.e. staging) with their IAM<user-name> - If approved, team lead will add dev's IAM user to the IAM group with access to base-stage
$ gunnerfy users add -u <user-name> -s <base-stage>
- The app will print the team lead a command to send to the new developer for them to run like this:
$ gunnerfy add-project <project-name> -s <baseStage>
While DynamoDB is the default data store, Gunnerfy also allows teams to build a serverless datastore using MySQL on RDS.
$ cd <project-name>
$ gunnerfy generate migration -n <migration-name> -s <sql-statement>
$ gunnerfy migrate
$ amplify env checkout <stage>
$ amplify api add-graphql-datasource
$ gunnerfy develop
$ cd react-client
$ STAGE=<stage> npm run start
$ cd react-native-client
$ STAGE=<stage> npm run <simulator> (ios|android)
$ git checkout <base-stage (staging|prodution>; git pull; # this makes sure you have the latest code and hotfixes
$ git checkout <stage>; git merge <base-stage>
$ amplify env checkout <stage>
$ git checkout -b <issue-number>
$ # work work work
$ gunnerfy deploy backend # if you need to make backend changes
$ git add .; git commit -am “closes #<issue-number>”
$ git checkout <stage>
$ git merge <issue-number>
$ git push
$ git branch -D <issue-number>
$ # Repeat on all issues assigned
Each developer on the project will submit a pull request at the end of the iteration
$ gunnerfy git-submit -i <iteration-end-date: (format: YYYYMMDD)> -t <target-stage>
Team lead reviews and approves pull requests
$ gunnerfy git-approve -i <request-id> -s <stage> # gunnerfy git-approve -i 2 -s staging
$ # repeat above for all pull requests
$ gunnerfy git-tag -s <stage> -i <iteration-end-date (format: YYYYMMDD)>
$ gunnerfy deploy backend -s <stage>
$ gunnerfy deploy mobile -s <stage>
$ gunnerfy deploy web -s <stage>
- IAM Cross Account Access
- Amplify GraphQL
- Amplify Workflow
- Amplify VSCode Extension
- Amplify with AppSync
- Serverless Framework Docs
- AWS CloudFormation Docs
- AppSync with Aurora
- Expo Docs
- React Native Docs
- React Docs
- Apollo Docs
- Ramda Docs
- RxJS Docs
- AppSync Docs
If you want to delete an account, simply close the account.
However, you should also remove the IAM Group and IAM Policy in the main account as well
See gunnerfy.js for full list of commands. Run $ gunnerfy <command> --help for more information
Please see the issues section on Github for a list of development and documentation items.
If you have an issue or question, please feel free to open a new issue.