package tdl.s3;

import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.AWSCredentialsProvider;
import com.amazonaws.auth.AWSStaticCredentialsProvider;
import com.amazonaws.auth.BasicAWSCredentials;
import com.amazonaws.services.s3.AmazonS3;
import com.amazonaws.services.s3.AmazonS3ClientBuilder;
import tdl.s3.upload.FileUploadingService;

import java.io.File;
import java.util.Scanner;

public class SyncFileApp {

    public static void main(String[] args) {
        if (args.length == 0) System.out.println("Specify file to upload please.");

        String region = getArg("Specify AWS region...");//"eu-west-1";
        String accessKey = getArg("Specify AWS access key...");//"AKIAJJ3E7NQI3EVXR5RA";
        String secretKey = getArg("Specify AWS secret key...");//"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";
        String filePath = getArg("Specify file to upload...");//"/home/vdanyliuk/Музика/AC_DC/1979 - Highway To Hell/09. Love Hungry Man.mp3";
        File file = new File(filePath);

        AWSCredentials credentials = new BasicAWSCredentials(accessKey, secretKey);
        AWSCredentialsProvider credentialsProvider = new AWSStaticCredentialsProvider(credentials);

        AmazonS3 amazonS3 = AmazonS3ClientBuilder.standard()
                .withCredentials(credentialsProvider)
                .withRegion(region)
                .build();
        FileUploadingService fileUploadingService = new FileUploadingService(amazonS3, "test-bucket-ertretgsdfgsdfg");

        fileUploadingService.upload(file);
    }

    private static String getArg(String message) {
        System.out.println(message);
        Scanner scanner = new Scanner(System.in);
        return scanner.nextLine();
    }
}

@@ -300,24 +300,103 @@
 entBuilder;%0A
+import com.beust.jcommander.JCommander;%0Aimport com.beust.jcommander.Parameter;%0A
 import tdl.s
@@ -511,586 +511,651 @@
     
-public static void main(String%5B%5D args) %7B%0A        if (args.length == 0) System.out.println(%22Specify file to upload please.%22);%0A%0A        String region = getArg(%22Specify AWS region...%22);//%22eu-west-1%22;%0A        String accessKey = getArg(%22Specify AWS access key...%22);//%22AKIAJJ3E7NQI3EVXR5RA%22;%0A        String secretKey = getArg(%22Specify AWS secret key...%22);//%22c6CM/103mlcvtT/gMXK8ajMhzOsCvBci6wOAQNOU%22;%0A        String filePath = getArg(%22Specify file to upload...%22);//%22/home/vdanyliuk/%D0%9C%D1%83%D0%B7%D0%B8%D0%BA%D0%B0/AC_DC/1979 - Highway To Hell/09. Love Hungry Man.mp3%22
+@Parameter(names=%7B%22--access-key%22, %22-a%22%7D, required = true)%0A    private String accessKey;%0A%0A    @Parameter(names=%7B%22--secret-key%22, %22-s%22%7D, required = true)%0A    private String secretKey;%0A%0A    @Parameter(names=%7B%22--region%22, %22-r%22%7D, required = true)%0A    private String region;%0A%0A    @Parameter(names=%7B%22--bucket%22, %22-b%22%7D, required = true)%0A    private String bucket;%0A%0A    @Parameter(names=%7B%22--file%22, %22-f%22%7D, required = true)%0A    private String filePath;%0A%0A    public static void main(String%5B%5D args) %7B%0A        SyncFileApp main = new SyncFileApp();%0A%0A        JCommander jCommander = new JCommander(main, args);%0A%0A        main.run()
 ;%0A    
+%7D%0A%0A
     
-File file = new File(filePath);%0A
+public void run() %7B
 %0A   
@@ -1604,41 +1604,58 @@
 S3, 
-%22test-bucket-ertretgsdfgsdfg%22
+bucket);%0A%0A        File file = new File(filePath
 );%0A
-%0A
     

Use JCommander for arg parsing