Skip to content

Commit 97f80da

Browse files
committed
[update] - add function to get the s3 arn
1 parent d8a2950 commit 97f80da

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

services/s3.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ aws_s3_get_object_metadata() {
1919

2020
}
2121

22+
aws_s3_get_s3_bucket_arn() {
23+
aws_s3_bucket_name=$1
24+
echo "arn:aws:s3:::${aws_s3_bucket_name:?'aws_s3_bucket_name is unset or empty'}"
25+
}
26+
27+
aws_s3_get_s3_bucket_arn_with_hint() {
28+
aws_s3_get_s3_bucket_arn $(echo "$(peco_aws_s3_list)" | peco)
29+
}
30+
2231
# aws_s3_get_object_metadata_with_hint() {
2332
# bucket_name=$(echo "$(peco_aws_s3_list)" | peco)
2433
# object_key=$2

0 commit comments

Comments
 (0)