This is the AWS Infrastructure for the file explorer project, a full setup guide will exist in the lichfiet/file-explorer-web repository at some point, but this will walk you through how to set up your AWS services with Terraform.
- Terraform
- An AWS Account
- A can-do attitude
-
git clone https://github.com/lichfiet/file-explorer-infra.git && cd file-explorer-infra && terraform init
-
- Go to the IAM Service in AWS
- Select Users and then Create New
- Enter a user name and click Next
- Select "Attach Policies Directly" and then click Next
- Add the "Administrator Access" policy and click Next
- Click Create User
Then, once you are back in the IAM user list:
- Select Users
- Select the user you just created
- Click the "Create Access Key" hyperlink.
Then copy this information and paste it into your
.env
file -
Change the file name with
mv .env.sample .env
and then you will need an AWS Admin IAM User's Access Key and Secret Key.In the
.env
file, replace theYOUR AWS ACCESS KEY
with your AWS IAM User's Acess Key, and replace theYOUR AWS SECRET ACCESS KEY
with your secret key.(Ex.
.env
file)AWS_ACCESS_KEY_ID=123456789 AWS_SECRET_ACCESS_KEY=1a2b3c4d5e6f7g
then, run
export $(grep -v '^#' .env | xargs)
You'll want to hold on to these credentials, as the backend can/uses the same access key and secret to talk to AWS.
-
Run
terraform apply
to build your infrastructureWhen run, it will output the S3 Bucket name.
-
Make sure you have you credentials from step 2. You will need to copy these to place in your
.env
file of the backend service. If you navigated from the main tutorial, you can head back by clicking here. Or, move on to the next step which is configuring your backend.
- Add API Key Auth (In Progress)
- Rebuild API Methods into terraform resources, currently using api export.
- Implement methods for using secrets manager with API Key.