Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
36 lines (29 sloc) 890 Bytes
title currentMenu introduction
Environment variables
php
Define environment variables for your Bref application.

Environment variables can be defined in template.yml.

To define an environment variable that will be available in all functions declare it in the Globals section:

# Define your global variables in the `Globals` section
Globals:
    Function:
        Environment:
            Variables:
                MY_VARIABLE: 'my value'

# Define your functions in the `Resources` section
Resources:
    # ...

To define an environment variable that will be available in a specific function declare it inside the function's properties:

Resources:
    MyFunction:
        Type: AWS::Serverless::Function
        Properties:
            # ...
            Environment:
                Variables:
                    MY_VARIABLE: 'my value'