To set up Bref correctly please complete all the sections below.
You will need an AWS account. To create one, go on aws.amazon.com and click Sign up.
AWS has a generous free tier that will usually allow you to deploy your first test applications for free.
Bref relies on AWS SAM and AWS access keys to interact with AWS.
You will need to:
- install AWS CLI
- setup AWS credentials: create AWS access keys and configure AWS CLI by either:
aws configure(quick configuration)
- or by using environment variables
The default region SAM will use is
us-east-1 (North Virginia, USA).
If you know you want to use a different region (for example to host your application closer to your visitors) you can define the
AWS_DEFAULT_REGION environment variable. For example
export AWS_DEFAULT_REGION=eu-west-1 in your shell.
Alternatively the region can be overridden on every SAM command by setting the
Install Bref in your project using Composer:
composer require mnapoli/bref
To run the latest version of Bref you must have PHP 7.2 or greater! If you are using PHP 7.1 or less an older (outdated) version of Bref will be installed instead.
bref command line tool can now be used by running
vendor/bin/bref in your project.
Read the first steps guide to create and deploy your first serverless application using Bref.