mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-08-20 06:35:54 +02:00
4.7 KiB
4.7 KiB
title
| title |
|---|
| AWS S3 |
You can create an AWS S3 bucket to store your uploaded documents using OpenSign™
AWS S3 -
- Step 1 : Create a S3 bucket
- Login to AWS console
- Navigate to S3 under services.
- Hit "Create Bucket" button on upper right corner.
- Now provide bucket name and don't change any other options scroll down and click on "Create Bucket" button.
- Click on name of bucket from list which we have just created.
- Now go to permission Tab and scroll down to botton.
- At the bottom you will see cross-origin resource sharign (cors) section click on "Edit" button.
- Now paste below line of code and add origin url in AllowedOrigins array and click on "Save changes".
[ { "AllowedHeaders": [ "*" ], "AllowedMethods": [ "GET", "PUT", "POST" ], "AllowedOrigins": [ "https://localhost:3001" ], "ExposeHeaders": [ "x-amz-server-side-encryption", "x-amz-request-id", "x-amz-id-2" ], "MaxAgeSeconds": 3000 } ] - Once done go to "Properties" there you will see region of bucket e.g us-east-1
- set bucktname as "DO_SPACE" in ENV.
- set region as "DO_REGION" in ENV.
- Replace region in this url
s3.region.amazonaws.comand set it as "DO_ENDPOINT" in ENV. - Replace bucketName and region in this url
https://bucketName.s3.region.amazonaws.comand set us as "DO_BASEURL" in ENV.
- Step 2 : Create a aws policy
- Step 3 : Create IAM user.
- Now click on "Users" from left side "access management" menu and then click on "Create User" button.
- Provide username and click on Next button.
- Now select "Attach policies directly" from Permissions options.
- Now search policy in "Permission Policies" section which we have created in previous step.
- Now scroll down and Click on "Create User" Button.
- Now click on "Users" from left side "access management" menu and then click on "Create User" button.
- Step 4 : Generate Credentials
- Now Click on username form list which we have created in previous step.
- Click on "Create Access Key" from right corner.
- In the next step select "Application running outside AWS".
- In the next step you will see "Access key" and "Secret Access key". Copy both the values.
- Set the value of "Access key" to "DO_ACCESS_KEY_ID" environment variable.
- Set the value of "Secret Access key" to "DO_SECRET_ACCESS_KEY" environment variable. Visit below link if you face any issues while following the above instructions -
- https://repost.aws/knowledge-center/create-access-key