RDS のログデータを Java SDK で取得する

    AmazonRDS rds =
      new AmazonRDSClient(new BasicAWSCredentials(
        "*******************",
        "******************************"));
    rds.setEndpoint("rds.ap-northeast-1.amazonaws.com");

    String identifier = "*****";
    DescribeDBLogFilesResult describeDBLogFiles =
      rds.describeDBLogFiles(new DescribeDBLogFilesRequest()
        .withDBInstanceIdentifier(identifier));

    List<DescribeDBLogFilesDetails> logFiles =
      describeDBLogFiles.getDescribeDBLogFiles();
    for (DescribeDBLogFilesDetails d : logFiles) {
      DownloadDBLogFilePortionResult downloadDBLogFilePortion =
        rds.downloadDBLogFilePortion(new DownloadDBLogFilePortionRequest()
          .withDBInstanceIdentifier(identifier)
          .withLogFileName(d.getLogFileName()));
      String logData = downloadDBLogFilePortion.getLogFileData();
    }