samuel-massinon / partyfy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Partyfy

Convert a gif into a party gif!

First time Setup

Have a bucket to package your code to

export AWS_ACCOUNT_ID=(aws sts get-caller-identity --output text --query 'Account')
export PACKAGE_BUCKET="$AWS_ACCOUNT_ID-package-bucket"
aws s3api create-bucket --bucket $PACKAGE_BUCKET

Setup

You can use CloudFormation to set up Partyfy on your own AWS account

First, use aws cloudformation package to upload your code.
You can ignore the exports if PACKAGE_BUCKET is already set

export AWS_ACCOUNT_ID=(aws sts get-caller-identity --output text --query 'Account')
export PACKAGE_BUCKET="$AWS_ACCOUNT_ID-package-bucket"
aws cloudformation package \
  --template-file cloudformation.yaml \
  --s3-bucket $PACKAGE_BUCKET \
  --output-template-file packaged.yaml

Now deploy your stack

aws cloudformation deploy \
  --template-file packaged.yaml \
  --capabilities CAPABILITY_IAM \
  --stack-name partyfy

Using

Let's upload a GIF from CLI

export BUCKET_NAME=(
  aws cloudformation describe-stacks \
    --stack-name partyfy \
    --output text \
    --query "Stacks[0].Outputs[?OutputKey==`BucketName`].OutputValue"
)

or if you want to cheat

export BUCKET_NAME=$AWS_ACCOUNT_ID-partyfy

Upload a file to S3 (blob-octopus.gif in this example)

aws s3 cp blob-octopus.gif  s3://$BUCKET_NAME/prepartyfy/

Check that your file is on S3, or if your GIF has been partyfied

aws s3 ls s3://$BUCKET_NAME --recursive

Download partyfied GIF. (blob-octopus.gif in this example)

aws s3 cp s3://$BUCKET_NAME/partyfied/blob-octopus.gif ~/Downloads/

About


Languages

Language:Python 100.0%