diff --git a/bc-backup.sh b/bc-backup.sh index 737d074..27e27b9 100755 --- a/bc-backup.sh +++ b/bc-backup.sh @@ -107,6 +107,11 @@ S3_TOOL="${S3_TOOL:-awscli}" MAX_RETRIES="${MAX_RETRIES:-3}" CLEANUP_LOCAL="${CLEANUP_LOCAL:-true}" +# Export AWS credentials so aws cli can find them +export AWS_ACCESS_KEY_ID +export AWS_SECRET_ACCESS_KEY +export AWS_DEFAULT_REGION="${AWS_DEFAULT_REGION:-us-east-1}" + # Determine SinceDateTime for incremental mode SINCE_DATETIME="" if [[ "${BACKUP_MODE}" == "incremental" ]]; then diff --git a/bc-cleanup.sh b/bc-cleanup.sh index a3e4dfb..8adf58f 100755 --- a/bc-cleanup.sh +++ b/bc-cleanup.sh @@ -39,6 +39,11 @@ done RETENTION_DAYS="${RETENTION_DAYS:-30}" +# Export AWS credentials so aws cli can find them +export AWS_ACCESS_KEY_ID +export AWS_SECRET_ACCESS_KEY +export AWS_DEFAULT_REGION="${AWS_DEFAULT_REGION:-us-east-1}" + # Calculate cutoff date if [[ "$OSTYPE" == "darwin"* ]]; then CUTOFF_DATE=$(date -u -v-${RETENTION_DAYS}d '+%Y-%m-%dT%H:%M:%SZ')