Skip to main content

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. Screenshot 2024-09-30 203247
    • Hit "Create Bucket" button on upper right corner. Screenshot 2024-09-30 195246
    • Now provide bucket name and don't change any other options scroll down and click on "Create Bucket" button. Screenshot 2024-09-30 195603 Screenshot 2024-09-30 195835
    • Click on name of bucket from list which we have just created.
    • Now go to permission Tab and scroll down to botton. Screenshot 2024-09-30 202035
    • At the bottom you will see cross-origin resource sharign (cors) section click on "Edit" button. Screenshot 2024-09-30 202057
    • 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",
      "https://app.opensignlabs.com"
      ],
      "ExposeHeaders": [
      "x-amz-server-side-encryption",
      "x-amz-request-id",
      "x-amz-id-2"
      ],
      "MaxAgeSeconds": 3000
      }
      ]
    • Once completed, navigate to "Properties," where you'll find the bucket region (e.g., us-east-1).
    • Set the bucket name you created in step 1 as the value for "DO_SPACE" in the ENV file.
    • Assign the region value to the "DO_REGION" variable in the ENV file.
    • Replace the region in the URL s3.region.amazonaws.com and set it as "DO_ENDPOINT" in the ENV file.
    • Replace both the bucket name and region in the URL https://bucketName.s3.region.amazonaws.com and set it as "DO_BASEURL" in the ENV file.
  • Step 2 : Create a aws policy
    • Navigate to IAM under services Screenshot 2024-09-30 200247
    • Now click on "Polices" from left side "access management" menu.
    • Hit "Create Policy" button on upper right corner. Screenshot 2024-09-30 200939
    • Search for S3 and Tick "PutObject" and "GetObject" from "Specify permissions" screen. Screenshot 2024-09-30 200537 Screenshot 2024-09-30 200607
    • Select "All" under Resources Screenshot 2024-09-30 200929
    • provide policy name and hit on 'Create Policy". Screenshot 2024-09-30 200808
  • Step 3 : Create IAM user.
    • Now click on "Users" from left side "access management" menu and then click on "Create User" button. Screenshot 2024-09-30 201026
    • Provide username and click on Next button.
    • Now select "Attach policies directly" from Permissions options. Screenshot 2024-09-30 201731
    • Now, search for the policy we created in the previous step within the "Permissions Policies" section. Screenshot 2024-09-30 201742
    • Now scroll down and Click on "Create User" Button.
  • Step 4 : Generate Credentials
    • Now Click on username form list which we have created in previous step.
    • Navigate to "Security credentials".
    • Click on "Create Access Key" from right corner. Screenshot 2024-09-30 201850
    • In the next step select "Application running outside AWS". Screenshot 2024-09-30 201917
    • In the next step, you will see the "Access key" and "Secret Access key." Copy both values.
    • Assign the "Access key" value to the "DO_ACCESS_KEY_ID" environment variable.
    • Assign the "Secret Access key" value to the "DO_SECRET_ACCESS_KEY" environment variable.

If you encounter any issues while following these instructions, refer to the link below: - https://repost.aws/knowledge-center/create-access-key