This API is designed to be as generic as possible. You can upload any file using S3 presigned URLs and store any data using DynamoDB. The API provides basic security by allowing only authenticated users to perform write actions (POST, UPDATE, DELETE).
First, you need to create a new AWS user and assign the following permissions:
AmazonAPIGatewayAdministratorAmazonDynamoDBFullAccessAmazonS3FullAccessAWSCloudFormationFullAccessAWSCloudFormationReadOnlyAccessAWSLambda_FullAccessCloudWatchLogsFullAccessIAMFullAccess
Once the user is created, generate a new access key for this user.
- Create a
.envfile at the root of the repository and fill it with the same information found in.env.example. Make sure to include the access key and secret key for the AWS user you just created.
- Create a file named
runtime-env.jsonin the./appdirectory. You can use theruntime-env.json.exampleas a reference for how to structure this file. - Fill the
properties.jsonfile with appropriate values. This will vary depending on your specific use case.
- To deploy the API, simply run
docker compose up, and the entire API should be deployed on AWS. Be mindful of potential errors.
- Some characters are forbidden in DynamoDB table keys (e.g.,
/,\\,.,#,~,{},<>). - Your S3 bucket name must be globally unique, so feel free to add randomness to your bucket name.
- Some characters are forbidden in S3 buckets names. (ex: uppercase characters)
- A Postman collection is available at the root of the repository: postman_collection.json
- An OpenAPI (Swagger) file is also available at the root of the repository: openAPI.yml