It appears that your scenario is:
- Some software on an Amazon EC2 instance is used to process data on the local disk
- You are manually transferring that data to/from the instance via Amazon S3
An Amazon EC2 instance is just like any other computer. It runs the same operating system and the same software as you would on a server in your company. However, it does benefit from being in the cloud in that it has easy access to other services (such as Amazon S3) and resources can be turned off to save expense.
Optimize current process
In sticking with the current process, you could improve it with some simple automation:
- Upload your data to Amazon S3 via an AWS Command-Line Interface (CLI) command, such as:
aws s3 cp file.txt s3://my-bucket/input/
- Execute a script on the EC2 process that will:
- Download the file, eg:
aws s3 cp s3://my-bucket/input/file.txt .
- Process the file
- Copy the results to S3, eg:
aws s3 cp file.txt s3://my-bucket/output/
- Download the results to your own computer, eg:
aws s3 cp s3://my-bucket/output/file.txt .
Use scp to copy files
Assuming that you are connect to a Linux instance, you could automate via:
- Use
scp to copy the file to the EC2 instance (which is very similar to the SSH command)
- Use
ssh with a [remote command(https://malcontentcomics.com/systemsboy/2006/07/send-remote-commands-via-ssh.html) parameter to trigger the remote process
- Use
scp to copy the file down once complete
Re-architect to use AWS Lambda
If the job that runs on the data is suitable for being run as an AWS Lambda function, then the flow would be:
- Upload the data to Amazon S3
- This automatically triggers the Lambda function, which processes the data and stores the result
- Download the result from Amazon S3
Please note that an AWS Lambda function runs for a maximum of 15 minutes and has a limit of 512MB of temporary disk space. (This can be expanded by using Amazon EFS is needed.)
Something in-between
There are other ways to upload/download data, such as running a web server on the EC2 instance and interacting via a web browser, or using AWS Systems Manager Run Command to trigger the process on the EC2 instance. Such a choice would be based on how much you are permitted to modify what is running on the instance and your technical capabilities.