Documentation
Setup

Setup

To use Bref, you will need an AWS account and the serverless CLI. Let's get started:

AWS account

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.

Serverless CLI

Bref relies on the Serverless framework (opens in a new tab) and AWS access keys to deploy applications. You will need to install the serverless CLI (more details here (opens in a new tab)):

npm install -g serverless

Bref is compatible with Serverless Framework v3 (current version).

AWS credentials

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.

  • Create AWS access keys

  • 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 configure command with the aws CLI.

    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

What's next?

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.