In this step, you will create a new Amazon S3 bucket and upload test data in it. This bucket will then be linked to the FSx Lustre filesystem created in the previous step.
You can create S3 bucket either via AWS console or via AWS CLI. For this lab you are going to use AWS CLI to create S3 bucket and upload data. However, later on you will also be able to take a look at the S3 console to view the bucket and its contents.
The bucket name must start with s3://. Choose a random prefix, postfix, or append your name.
BUCKET_POSTFIX=$(python3 -S -c "import uuid; print(str(uuid.uuid4().hex)[:10])")
BUCKET_NAME_DATA="fsx-dra-${BUCKET_POSTFIX}"
aws s3 mb s3://${BUCKET_NAME_DATA} --region ${AWS_REGION}
Keep note of your bucket name. If you forget your bucket name, you can view it in the Amazon S3 Dashboard.
echo "export BUCKET_NAME_DATA=${BUCKET_NAME_DATA}" >> ~/environment/env_vars
echo ${BUCKET_NAME_DATA}
wget http://s3.amazonaws.com/open.source.geoscience/open_data/seg_eage_salt/SEG_C3NA_Velocity.sgy
aws s3 cp ./SEG_C3NA_Velocity.sgy s3://${BUCKET_NAME_DATA}/SEG_C3NA_Velocity.sgy
aws s3 ls s3://${BUCKET_NAME_DATA}/
rm SEG_C3NA_Velocity.sgy