scp -i ~/Downloads/file.pem local_image_file user@ec2_elastic_ip:/home/user/images/
# easy way
import boto3
s3 = boto3.resource(
service_name='s3',
region_name='Your region',
aws_access_key_id='Your id',
aws_secret_access_key="Your Key")
bucket = s3.Bucket('your bucket name')
bucket.upload_file(Filename='temp.csv', Key='temp.csv')
# file path __________↑ ↑
# (which you want to upload) |
# |______path (where you want to upload inside bucket)