Serverless image scaling service built with AWS Lambda
and API Gateway
.
A Dockerfile is provided to build a container with the required dependencies.
make container
Set up AWS credentials in the container using make and a credentials.csv file containing credentials of an IAM user capable of deploying.
Run make setupAWS
after mounting the .csv inside the container in /go
or manually setup credentials yourself using aws configure
inside the container
or simply setup environment variables
$ export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
$ export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
$ export AWS_DEFAULT_REGION=us-west-2
Run the container with the required directories mounted using the following command
make runcontainer
The lambda function must be package into a zip file so it can be deployed by Terraform
make zip
will build an orion executable and a lambda.zip
make deploy
will automatically build lambda.zip and use Terraform to create the AWS architecture
make destroy
conversly destroys the AWS deployment
Run a simple test to check the API Gateway endpoint to ensure that the lambda is working as intended
make test
- Require authentication to access lambda
- More features: filters, convertion, video scaling...
- Seamless upgrades and rollbacks by versioning resources with prefixes