public boolean putFileToAWS(String parentPath, String fileName) {
		try {    
			String filePath;
			if (parentPath.length() == user.getUsername().length() + 1) {
				filePath = parentPath + fileName;
			} else {
				filePath = parentPath + "\\" + fileName;
			}
			
			if(parentPath.length() != user.getUsername().length() + 1) {
				buildPath(parentPath); // create a setup file under each directory in the path on AWS
			}
			
			File newFile = new File(filePath); 
			if (!newFile.exists() || newFile.isDirectory()) {
				System.out.println("The file does not exist on local machine, failed to upload to AWS, " + filePath);
				return false;
			}
			
			// encrypt the file using AES key
			String encryptedPath = parentPath + "\\encrptyed_" + fileName;
			File encryptedFile = new File(encryptedPath);

			// read original file to a string and encrypt the string
			BufferedReader reader = new BufferedReader( new FileReader(newFile));
		    String line = null;
		    StringBuilder stringBuilder = new StringBuilder();
		    String ls = System.getProperty("line.separator");

		    while( ( line = reader.readLine() ) != null ) {
		        stringBuilder.append( line );
		        stringBuilder.append( ls );
		    }
		    
		    reader.close();
		   
		    Cipher cipher = Cipher.getInstance("AES");
		    cipher.init(Cipher.ENCRYPT_MODE, aesFileKey);
		    String encryptedString = parseByte2HexStr(cipher.doFinal(stringBuilder.toString().getBytes()));
		    
		    System.out.print("Original file content: " + stringBuilder.toString());
		    System.out.println("Encrypted file content: " + encryptedString);
		    
		    // write encrypted string to file
		    BufferedWriter writer = new BufferedWriter( new FileWriter(encryptedFile));
		    writer.write(encryptedString);
		    writer.close();
			
			String bucketName = "SafeBox";
	        String key = filePath.replace("\\", "/");
	        
            fileStorage.putObject(new PutObjectRequest(bucketName, key, encryptedFile));
            encryptedFile.delete();
            //System.out.println("Uploding to S3 succeed, " + filePath);
	        return true;
		} catch (AmazonServiceException ase) {
            System.out.println("Caught an AmazonServiceException, which means your request made it "
                    + "to Amazon S3, but was rejected with an error response for some reason.");
            System.out.println("Error Message:    " + ase.getMessage());
            System.out.println("HTTP Status Code: " + ase.getStatusCode());
            System.out.println("AWS Error Code:   " + ase.getErrorCode());
            System.out.println("Error Type:       " + ase.getErrorType());
            System.out.println("Request ID:       " + ase.getRequestId());
            return false;
        } catch (AmazonClientException ace) {
            System.out.println("Caught an AmazonClientException, which means the client encountered "
                    + "a serious internal problem while trying to communicate with S3, "
                    + "such as not being able to access the network.");
            System.out.println("Error Message: " + ace.getMessage());
            return false;
        } catch (Exception e) {
        	e.printStackTrace();
        	return false;
        }
	}