Browse Source

changed username in exception and path for user-data.txt

master
Sebastian Rieger 6 years ago
parent
commit
d05d127310
  1. 4
      VerteilteSysteme-Examples/src/verteiltesysteme/aws/StartVertSysServersFrankfurt.java
  2. 3
      VerteilteSysteme-Examples/src/verteiltesysteme/aws/StartVertSysServersTokyo.java

4
VerteilteSysteme-Examples/src/verteiltesysteme/aws/StartVertSysServersFrankfurt.java

@ -55,7 +55,7 @@ public class StartVertSysServersFrankfurt {
} catch (Exception e) {
throw new AmazonClientException("Cannot load the credentials from the credential profiles file. "
+ "Please make sure that your credentials file is at the correct "
+ "location (C:\\Users\\Sebastian\\.aws\\credentials), and is in valid format.", e);
+ "location (C:\\Users\\<username>\\.aws\\credentials), and is in valid format.", e);
}
// Frankfurt
@ -65,7 +65,7 @@ public class StartVertSysServersFrankfurt {
System.out.println("Loading user-data from file...");
byte[] encoded = Files.readAllBytes(Paths.get("src\\main\\java\\com\\amazonaws\\samples\\user-data.txt"));
byte[] encoded = Files.readAllBytes(Paths.get("src\\verteiltesysteme\\aws\\user-data.txt"));
String userData = Base64.getEncoder().encodeToString(encoded);
System.out.println("Starting instance in Frankfurt...");

3
VerteilteSysteme-Examples/src/verteiltesysteme/aws/StartVertSysServersTokyo.java

@ -55,7 +55,7 @@ public class StartVertSysServersTokyo {
} catch (Exception e) {
throw new AmazonClientException("Cannot load the credentials from the credential profiles file. "
+ "Please make sure that your credentials file is at the correct "
+ "location (C:\\Users\\Sebastian\\.aws\\credentials), and is in valid format.", e);
+ "location (C:\\Users\\sebas\\.aws\\credentials), and is in valid format.", e);
}
// Tokyo
@ -64,6 +64,7 @@ public class StartVertSysServersTokyo {
.withRegion("ap-northeast-1").build();
System.out.println("Loading user-data from file...");
System.out.println(System.getProperty("user.home"));
byte[] encoded = Files.readAllBytes(Paths.get("src\\verteiltesysteme\\aws\\user-data.txt"));
String userData = Base64.getEncoder().encodeToString(encoded);

Loading…
Cancel
Save