Setup Setup Your Product and AWS File Hosting
Full Delivery Flow:
User clicks "Download"
↓
Flask checks ProductAccess
↓
Flask generates presigned S3 URL
↓
User is redirected to S3
↓
ZIP downloads directly from AWS
Create a new product in your Admin area
Fill in all the fields for your product:
-
Marketing features: this is the list of all the features which will display in your landing page UI. (This is strict JSON so you can't have a comma after the last item).
-
Slug: the product's stable URL-safe identifier which is used for the download URL.
-
File key: the filename for the file on AWS which will be downloaded by the customer.
- Stripe Price Id: After creating your product on Stripe (covered in the Stripe section), copy the price ID and paste it here.
You should make sure that the price you put in your admin interface matches what you specify in the Stripe product dashboard. (Otherwise you will have a different price in your landing page to the price the customer sees in the Stripe checkout UI).
The price ID will always determine what the customer actually pays.
Note: By inputting Stripe Price Id here, you can manage the pricing per product in your DB admin without having to make a code change. This also means you can cleanly support multiple products with no hardcoded price id variables.
-
Is Active: this displays the product in your landing page UI. If unchecked the product won't show. This is useful for showing/hiding when creating test products.
-
Is Featured: Puts a featured outline around the product emphasising that it is the preferred choice for customers.
-
Display Order: If you have multiple products, position 1 will place the product on the far left, position 2 will put it on the right, position 3 will place it on the far right etc.
Create a Private S3 Bucket
-
Name: [your-product-name]
-
Region: your choice (match your app region)
-
Block all public access: ON
-
This bucket must be private only.
Upload Your Digital Product File
Inside your new bucket:
-
Click Upload
-
Upload your file (e.g. my_product_name.zip)
-
Important: Keep the filename the same as your File Key in database.
Create IAM User for Programmatic Access
You should never use root credentials for this.
Go to: IAM → Users → Create user
Settings: - Username: [your-product-name]-s3-user - Access type: Programmatic access
Attach Minimal S3 Permissions
Choose: Attach policies directly
Then: Create policy → JSON tab
Paste this:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetObject"
],
"Resource": "arn:aws:s3:::[your-bucket-name]/*"
}
]
}
Save the policy and attach it to the IAM user.
Generate Access Keys
After user creation:
Go to: IAM → Users → [your-product]-user → Security credentials
The click: Create Access Key.
You will receive:
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
⚠️ Copy them immediately.
Add Environment Variables
In your .env file:
AWS_ACCESS_KEY_ID="your_access_key"
AWS_SECRET_ACCESS_KEY="your_secret_key"
AWS_REGION="eu-west-2"
AWS_S3_BUCKET="your_buckekt_named"
When you deploy to Render:
Add these in: Render → Environment → Environment Variables