s3_host="http://192.168.0.201:7481" # Get the service client with sigv4 configured s3 = boto3.client('s3', aws_access_key_id = "test",aws_secret_access_key = "test",endpoint_url = s3_host, config=Config(signature_version='s3v4'))
# Generate the URL to get 'key-name' from 'bucket-name' # URL expires in 604800 seconds (seven days) url = s3.generate_presigned_url( ClientMethod='get_object', Params={ 'Bucket': 'movie', 'Key': '20200919211055.ps' }, ExpiresIn=604800 )