Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

curl command download from s3

#!/bin/sh 
outputFile="Your_PATH"
amzFile="AMAZON_FILE_PATH"
bucket="YOUR_BUCKET"
resource="/${bucket}/${amzFile}"
contentType="application/x-compressed-tar"
dateValue=`date -R`
stringToSign="GET

${contentType}
${dateValue}
${resource}"
s3Key="YOUR_S3_KEY"
s3Secret="YOUR_S3SECRET"
signature=`echo -en ${stringToSign} | openssl sha1 -hmac ${s3Secret} -binary | base64`

curl  -H "Host: ${bucket}.s3.amazonaws.com" 
     -H "Date: ${dateValue}" 
     -H "Content-Type: ${contentType}" 
     -H "Authorization: AWS ${s3Key}:${signature}" 
     https://${bucket}.s3.amazonaws.com/${amzFile} -o $outputFile
Comment

PREVIOUS NEXT
Code Example
Shell :: delete remote branch git 
Shell :: pwsh exit script 
Shell :: play nethack through firewall 
Shell :: how to hash a password in bash script 
Shell :: ffmpeg audio with echo 
Shell :: scratch studio 
Shell :: sftp client online linux remote 
Shell :: how to make terminal close after running code command 
Shell :: cffi not installed in dockerfile 
Shell :: Media change: please insert the disc 
Shell :: curl download with rate limit default 
Shell :: How to search for files using ? to match file extension 
Shell :: nx scaffolding 
Shell :: separate a line using sed 
Shell :: arch symlink 
Shell :: git init bare initialize empty git repository 
Shell :: Use Kubespray to deploy a Production Ready Kubernetes Cluster 
Shell :: windows command count output lines 
Shell :: docker latest release 
Shell :: linux bash shell join path 
Shell :: gitbuvcket 
Shell :: find and replace duplicate word linux 
Shell :: unix find files with specific year 
Shell :: remove files from git commit before push 
Shell :: how to get the group name of a project in gitlab 
Shell :: command to delete all files ending in .js in current and subdirectories 
Shell :: multipass snap 
Shell :: connaitre la taille fichier gz debian 
Shell :: vite 
Shell :: find command name specifc directories 
ADD CONTENT
Topic
Content
Source link
Name
2+8 =