Skip to content
Gradle plugin for deploying WARs to AWS Elastic Beanstalk.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
gradle/wrapper Update Gradle to 4.2 Nov 9, 2017
src AWS instance profile is not used by plugin (#22) Nov 26, 2018
.gitignore Update changelog Mar 29, 2019
LICENSE Add LICENSE Oct 12, 2017 Release 0.2.2 Mar 29, 2019
gradlew Initial revision. Mar 24, 2015
gradlew.bat Initial revision. Mar 24, 2015


Gradle plugin for deploying applications to AWS Elastic Beanstalk.


First, create ~/.aws/credentials with a profile for your app:


Or set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables.

Next, configure some deployments in your build.gradle:

plugins {
    id "fi.evident.beanstalk" version "0.2.22"

// beanstalk requires unique version number for each uploaded archive
// SNAPSHOT will be replaced with 'yyyyMMdd.HHmms' label
version = '0.1-SNAPSHOT'

beanstalk {
    profile = 'my-profile' // Only required if using .aws/credentials
    s3Endpoint = ""
    beanstalkEndpoint = ""

    deployments {
        // Example to deploy to the same env
        staging {
            file = tasks.war
            application = 'my-app'
            environment = 'my-app-staging'
        // Example to create a new env for each version (to use URL swapping for blue/green deployment)
        production {
            file = tasks.productionWar
            application = 'my-app'
            environment = "my-app-${project.version.replaceAll('\\.', '-')}"
            template = 'default' // Saved configuration name to use to create each env

Finally, deploy by running gradle deploy<deployment-name>, e.g. gradle deployStaging.

You can’t perform that action at this time.