File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -205,3 +205,13 @@ aws_ec2_other_commandlines() {
205205 fi
206206
207207}
208+
209+ aws_ec2_get_credential_from_metadata_instruction () {
210+ local aws_meta_data_address=" http://169.254.169.254"
211+ cat << -__EOF__
212+ # Run on ec2
213+ iam_role_name=\$ (curl -s '${aws_meta_data_address} /latest/meta-data/iam/security-credentials/')
214+ curl -s ${aws_meta_data_address} /latest/meta-data/iam/security-credentials/\$ {iam_role_name}
215+ __EOF__
216+
217+ }
Original file line number Diff line number Diff line change @@ -139,3 +139,11 @@ aws_s3_get_presigned_url() {
139139 "
140140
141141}
142+
143+ aws_s3_cp_folder_instruction () {
144+ echo " \
145+ aws s3 cp s3://BUCKET_NAME/cf/cf-domain.com/cf-domain.com-2022-12 \
146+ s3://NEW_BUCKET_NAME/cf-domain.com-2022-12/00-10 --recursive --exclude \" *\" --include \" CF_ID.2022-12-0*\"
147+ "
148+
149+ }
You can’t perform that action at this time.
0 commit comments