Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Custom build and configuration with a Buildfile on Elastic Beanstalk

Focus mode
Custom build and configuration with a Buildfile on Elastic Beanstalk - AWS Elastic Beanstalk

To specify a custom build and configuration command for your Go application, include a file called Buildfile at the root of your source bundle. The file name is case sensitive. Use the following format for the Buildfile:

<process_name>: <command>

The command in your Buildfile must match the following regular expression: ^[A-Za-z0-9_]+:\s*.+$.

Elastic Beanstalk doesn't monitor the application that is run with a Buildfile. Use a Buildfile for commands that run for short periods and terminate after completing their tasks. For long-running application processes that should not exit, use the Procfile instead.

In the following example of a Buildfile, build.sh is a shell script that is located at the root of the source bundle:

make: ./build.sh

All paths in the Buildfile are relative to the root of the source bundle. If you know in advance where the files reside on the instance, you can include absolute paths in the Buildfile.

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.