File tree Expand file tree Collapse file tree 7 files changed +8
-6
lines changed
Expand file tree Collapse file tree 7 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 1+ option_settings:
2+ aws:elasticbeanstalk:application:environment:
3+ AWS_REGION: '`{"Ref" : "AWS::Region"}`'
Original file line number Diff line number Diff line change @@ -7,5 +7,4 @@ public class Constants {
77 public static final String USER_TABLE = "scorekeep-user" ;
88 public static final String MOVE_TABLE = "scorekeep-move" ;
99 public static final String STATE_TABLE = "scorekeep-state" ;
10- public static final Regions REGION = Regions .US_EAST_1 ;
1110}
Original file line number Diff line number Diff line change 2727public class GameModel {
2828 /** AWS SDK credentials. */
2929 private AmazonDynamoDB client = AmazonDynamoDBClientBuilder .standard ()
30- .withRegion (Constants . REGION )
30+ .withRegion (Regions . fromName ( System . getenv ( "AWS_REGION" )) )
3131 .build ();
3232 private DynamoDBMapper mapper = new DynamoDBMapper (client );
3333 private SessionModel sessionModel = new SessionModel ();
Original file line number Diff line number Diff line change 2727public class MoveModel {
2828 /** AWS SDK credentials. */
2929 private AmazonDynamoDB client = AmazonDynamoDBClientBuilder .standard ()
30- .withRegion (Constants . REGION )
30+ .withRegion (Regions . fromName ( System . getenv ( "AWS_REGION" )) )
3131 .build ();
3232 private DynamoDBMapper mapper = new DynamoDBMapper (client );
3333 private SessionModel sessionModel = new SessionModel ();
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ public class SessionModel {
1717
1818 /** AWS SDK credentials. */
1919 private AmazonDynamoDB client = AmazonDynamoDBClientBuilder .standard ()
20- .withRegion (Constants . REGION )
20+ .withRegion (Regions . fromName ( System . getenv ( "AWS_REGION" )) )
2121 .build ();
2222 private DynamoDBMapper mapper = new DynamoDBMapper (client );
2323
Original file line number Diff line number Diff line change 3131public class StateModel {
3232 /** AWS SDK credentials. */
3333 private AmazonDynamoDB client = AmazonDynamoDBClientBuilder .standard ()
34- .withRegion (Constants . REGION )
34+ .withRegion (Regions . fromName ( System . getenv ( "AWS_REGION" )) )
3535 .build ();
3636 private DynamoDBMapper mapper = new DynamoDBMapper (client );
3737 private SessionModel sessionModel = new SessionModel ();
Original file line number Diff line number Diff line change 1616public class UserModel {
1717 /** AWS SDK credentials. */
1818 private AmazonDynamoDB client = AmazonDynamoDBClientBuilder .standard ()
19- .withRegion (Constants . REGION )
19+ .withRegion (Regions . fromName ( System . getenv ( "AWS_REGION" )) )
2020 .build ();
2121 private DynamoDBMapper mapper = new DynamoDBMapper (client );
2222
You can’t perform that action at this time.
0 commit comments