Skip to content

Commit

Permalink
fix secret manager value fetch and lambda memory size
Browse files Browse the repository at this point in the history
  • Loading branch information
assafkamil committed Jan 2, 2021
1 parent 141446a commit bd69ffd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/flyway-git/cloudformation/flyway-git.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Resources:
GIT_REPOSITORY: !Ref GitRepo
GIT_FOLDERS: !Ref GitFolders
Handler: com.geekoosh.flyway.FlywayHandler::handleRequest
MemorySize: 256
MemorySize: 512
Role: !GetAtt FlywayLambdaExecutionRole.Arn
Runtime: java8
Timeout: 120
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/geekoosh/flyway/request/DBRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public static DBRequest build(DBRequest base) {
String dbSecret = systemEnvironment.getEnv(SecretVars.DB_SECRET);
if(dbSecret != null) {
JSONObject json = ValueManager.latestSecretJson(dbSecret);
base.setUsername(json.getString("username"));
base.setPassword(json.getString("password"));
base.setUsername(json.get("username").toString());
base.setPassword(json.get("password").toString());
} else {
base.setUsername(ValueManager.value(
base.getUsername(), EnvironmentVars.DB_USERNAME
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/geekoosh/flyway/request/GitRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ public static GitRequest build(GitRequest base) {
String gitSecret = systemEnvironment.getEnv(SecretVars.GIT_SECRET);
if(gitSecret != null) {
JSONObject json = ValueManager.latestSecretJson(gitSecret);
base.setUsername(json.getString("username"));
base.setPassword(json.getString("password"));
base.setUsername(json.get("username").toString());
base.setPassword(json.get("password").toString());

logger.info("Using secret git variables");
} else {
Expand Down

0 comments on commit bd69ffd

Please sign in to comment.