Skip to content

Instantly share code, notes, and snippets.

@patrickbrus
Created September 18, 2022 13:46
Show Gist options
  • Save patrickbrus/6c0fd2fe1d28a8678a4e2e7223750a51 to your computer and use it in GitHub Desktop.
Save patrickbrus/6c0fd2fe1d28a8678a4e2e7223750a51 to your computer and use it in GitHub Desktop.
#!/bin/bash
BUCKET_NAME=birds-classifier-model-bucket
AWS_ID=$(aws sts get-caller-identity --query Account --output text | cat)
AWS_REGION=$(aws configure get region)
echo "Creating bucket "
aws s3api create-bucket --acl public-read --bucket $BUCKET_NAME --create-bucket-configuration LocationConstraint=$AWS_REGION
echo "Enable versioning"
aws s3api put-bucket-versioning --bucket $BUCKET_NAME --versioning-configuration Status=Enabled
echo "Add model to bucket"
aws s3 cp ../model s3://$BUCKET_NAME/ --recursive --output text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment