Z3nk
Z3nk

Reputation: 395

How to define spring profile on AWS

I have deployed my war file on AWS's Elastic Beanstalk as a java app.

I want to specify on AWS : spring.profiles.active like I do when I execute:

java -jar -Dspring.profiles.active=prod target/gaming-boost-0.0.1-SNAPSHOT.war

I can only configure "Environment Property" on "Configuration"

Upvotes: 6

Views: 7139

Answers (2)

Vaibhav
Vaibhav

Reputation: 2143

Set below environment variable in ElasticBeanStalk

SPRING_PROFILES_ACTIVE=prod

Upvotes: 7

Adam Erstelle
Adam Erstelle

Reputation: 2513

Take a look at https://stackoverflow.com/a/39021794/2135973

The casing is different when set as an Environment Variable versus the command line property. Try setting SPRING_PROFILES_ACTIVE in your EB Configuration.

Upvotes: 1

Related Questions