File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -23,15 +23,17 @@ VOL_1_ID=$(aws ec2 describe-instance-attribute --instance-id $MY_INSTANCE_ID --a
23
23
aws ec2 create-tags --resources $VOL_1_ID --tags Key=Name,Value=${APP_NAME} Worker
24
24
25
25
# 2. MOUNT S3
26
- echo " Mounting S3 using S3FS"
27
- if [[ -z " $AWS_ACCESS_KEY_ID " ]]; then
28
- echo " Using role credentials to mount S3"
29
- s3fs $SOURCE_BUCKET /home/ubuntu/bucket -o iam_role
30
- else
31
- echo " Using user credentials to mount S3"
32
- echo $AWS_ACCESS_KEY_ID :$AWS_SECRET_ACCESS_KEY > /credentials.txt
33
- chmod 600 /credentials.txt
34
- s3fs $SOURCE_BUCKET /home/ubuntu/bucket -o passwd_file=/credentials.txt
26
+ if [[ ${DOWNLOAD_FILES} == ' False' ]]; then
27
+ echo " Mounting S3 using S3FS"
28
+ if [[ -z " $AWS_ACCESS_KEY_ID " ]]; then
29
+ echo " Using role credentials to mount S3"
30
+ s3fs $SOURCE_BUCKET /home/ubuntu/bucket -o iam_role
31
+ else
32
+ echo " Using user credentials to mount S3"
33
+ echo $AWS_ACCESS_KEY_ID :$AWS_SECRET_ACCESS_KEY > /credentials.txt
34
+ chmod 600 /credentials.txt
35
+ s3fs $SOURCE_BUCKET /home/ubuntu/bucket -o passwd_file=/credentials.txt
36
+ fi
35
37
fi
36
38
37
39
# 3. SET UP ALARMS
You can’t perform that action at this time.
0 commit comments