To use Bref, you will need an AWS account and the
serverless CLI. Let's get started:
Bref deploys your applications to your AWS account. To create one, go to aws.amazon.com (opens in a new tab) and click Sign up.
AWS has a generous free tier that will usually allow you to deploy your first serverless applications for free.
npm install -g serverless
Bref is compatible with Serverless Framework v3 (current version).
Finally, we need AWS credentials so that the
serverless CLI can deploy to AWS.
If you have already set up AWS credentials on your machine (for example if you use the
aws CLI), you can skip this step.
Set up those keys by running:
serverless config credentials --provider aws --key "key" --secret "secret"
This will store the credentials in
~/.aws/credentials(the official file for AWS credentials (opens in a new tab)). This is the same as running the
aws configurecommand with the
Alternatively (for example in CI/CD), you can store credentials in environment variables:
export AWS_ACCESS_KEY_ID=key export AWS_SECRET_ACCESS_KEY=secret
That's it, you're ready to use Bref!
Bref is compatible with PHP 8.0 or greater. If you are using PHP 7.4, Bref v1 (previous major version) will be installed instead.