Skip to content

Latest commit

 

History

History
48 lines (32 loc) · 1.33 KB

File metadata and controls

48 lines (32 loc) · 1.33 KB

Container used to upload files to S3

This container does the following:

  • Read a file from an HTTP request form
  • Store the file in S3

Requirements

  • You have an account and are logged into the Scaleway console
  • You have created an API key in the console, with at least the ObjectStorageFullAccess, ContainerRegistryFullAccess, and FunctionsFullAccess permissions, plus access to the relevant project for Object Storage
  • You have Terraform installed on your machine
  • You have logged in to the Scaleway Container Registry (scw registry login)

Deploy on Scaleway

First you need to set the following environment variables:

export TF_VAR_access_key=<your API access key>
export TF_VAR_secret_key=<your API secret key>
export TF_VAR_project_id=<your project id>

Deployment can be done by running:

terraform init

terraform plan

terraform apply

You can then query your function by running:

# Upload a random Terraform file to the bucket
curl -F [email protected] $(terraform output -raw endpoint)

You can get the bucket name with:

terraform output -raw bucket_name

You should then see the requirements.txt file uploaded to your bucket.