Namviek

Namviek

Integrate Storage

Namviek currently support AWS S3 storage for default storage

There are two ways to configure your storage in Namviek as follows:

  • Configure default AWS S3 storage in .env file
  • Configure AWS S3 storage for each organization

Both you have to create an access token to use AWS S3

Create a bucket

Go to Amazon S3 > Buckets > Create bucket to create a new bucket.

In development mode, turn off public access for testing. Move to Bucket policy and paste the following

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "PublicReadGetObject",
      "Effect": "Allow",
      "Principal": "*",
      "Action": "s3:GetObject",
      "Resource": "arn:aws:s3:::your-store-name/*"
    }
  ]
}

And then, add this to Cross-origin resource sharing (CORS)

[
  {
    "AllowedHeaders": [
      "*"
    ],
    "AllowedMethods": [
      "PUT",
      "GET"
    ],
    "AllowedOrigins": [
      "http://localhost:4200"
    ],
    "ExposeHeaders": []
  },

  // optional
  {
    "AllowedHeaders": [
      "*"
    ],
    "AllowedMethods": [
      "PUT",
      "GET"
    ],
    "AllowedOrigins": [
      "https://<your-domain-here>"
    ],
    "ExposeHeaders": []
  }
]

Create an IAM user

Next, go to IAM > Users and click on Create user to create a new IAM user. In this example, I create an user called namviek-storage-default

At the step Attach policies directly search for AmazonS3FullAccess and select it

Create IAM User

Continue following the guide to create the iam user. After it done, click on the user and go to Security credentials as below

Create Security Credential

Create access key

In IAM > Users > namviek-storage-default scroll down to Access Keys section and click on Create access key

A new page will be opened that tell you to choose a specified case you want to use access key. For now, just click on Other option. Press Next and ignore decription tag then Create access key

Create access key

Save the access key into save place to use in next step.

Option 1: Update .env file

Open your .env file and update the following variables. That's it

AWS_ACCESS_KEY=
AWS_SECRET_ACCESS_KEY=
AWS_REGION=
AWS_S3_BUCKET=

Option 2: Update organization configure

Open the app and go to Setting > About. Click on Storage configuration and input your aws access token here.

Update s3 configure

Getting started

Setting up

Development Guide

Community