-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfigure-buckets.sh
executable file
·27 lines (23 loc) · 1.15 KB
/
configure-buckets.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
#
# This sets up AWS S3 buckets for the incoming WIBL data, and for the staging location
# for intermediate files before they get sent to DCDB.
source configuration-parameters.sh
echo $'\e[31m' Creating incoming data bucket as ${INCOMING_BUCKET} in region ${AWS_REGION}... $'\e[0m'
aws s3api create-bucket \
--bucket ${INCOMING_BUCKET} \
--region ${AWS_REGION} \
--create-bucket-configuration LocationConstraint=${AWS_REGION} \
| tee "${WIBL_BUILD_LOCATION}/create_lambda_${INCOMING_BUCKET}.json"
echo $'\e[31m' Creating staging data bucket as ${STAGING_BUCKET} in region ${AWS_REGION} ... $'\e[0m'
aws s3api create-bucket \
--bucket ${STAGING_BUCKET} \
--region ${AWS_REGION} \
--create-bucket-configuration LocationConstraint=${AWS_REGION} \
| tee "${WIBL_BUILD_LOCATION}/create_lambda_${STAGING_BUCKET}.json"
echo $'\e[31m' Creating staging data bucket as ${VIZ_BUCKET} in region ${AWS_REGION} ... $'\e[0m'
aws s3api create-bucket \
--bucket ${VIZ_BUCKET} \
--region ${AWS_REGION} \
--create-bucket-configuration LocationConstraint=${AWS_REGION} \
| tee "${WIBL_BUILD_LOCATION}/create_lambda_${VIZ_BUCKET}.json"