@things-factory/attachment-base 4.0.34 → 4.0.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,58 @@
1
+ # Creating S3 Bucket and Access Key Pair
2
+
3
+ In my opinion, it is better to have unique s3 bucket and aws permissions for each project. This document is for initial s3 configuration of the project you will be using.
4
+
5
+ ## 1. Creating S3 Bucket
6
+
7
+ ![create-s3-bucket](./assets/images/create-s3-bucket-1.png)
8
+ Go to AWS Console for S3 Service
9
+
10
+ ![create-s3-bucket](./assets/images/create-s3-bucket-2.png)
11
+ Create a bucket for your project.
12
+ Fill name, region and other are default configuration.
13
+
14
+ ## 2. Add User
15
+
16
+ ![add-user](./assets/images/add-user-1.png)
17
+ Move to AWS Console for IAM and select 'Access Management - Users'
18
+ And Click 'Add Users'
19
+
20
+ ![add-user](./assets/images/add-user-2.png)
21
+ Set User name and check for 'Access Key' as credential type.
22
+
23
+ ### Policy for accessing S3 bucket
24
+
25
+ ![create-policy](./assets/images/create-policy-1.png)
26
+ We need to create a policy for accessing s3 bucket you've made before.
27
+ Select 3rd one in 'Set permissions' section. And click 'Create Policy', It'll open new tab of your browser.
28
+
29
+ ![create-policy](./assets/images/create-policy-2.png)
30
+ Click JSON tab and edit for yours.
31
+
32
+ ```
33
+ {
34
+ "Version": "2012-10-17",
35
+ "Statement": [
36
+ {
37
+ "Effect": "Allow",
38
+ "Action": "s3:*",
39
+ "Resource": [
40
+ "arn:aws:s3:::my-project-attachments",
41
+ "arn:aws:s3:::my-project-attachments/*"
42
+ ]
43
+ }
44
+ ]
45
+ }
46
+ ```
47
+
48
+ ![create-policy](./assets/images/create-policy-3.png)
49
+ Set Name for the last step and finish creating the policy.
50
+
51
+ ### Assign the policy to user
52
+
53
+ ![add-user](./assets/images/add-user-3.png)
54
+ Now you can find new policy with 'refresh icon' button.
55
+ Check the new one and go next.
56
+
57
+ ![add-user](./assets/images/add-user-4.png)
58
+ Finally, you can get access key pair.
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/attachment-base",
3
- "version": "4.0.34",
3
+ "version": "4.0.38",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -28,12 +28,12 @@
28
28
  "@aws-sdk/lib-storage": "^3.46.0",
29
29
  "@aws-sdk/s3-presigned-post": "^3.46.0",
30
30
  "@koa/multer": "^3.0.0",
31
- "@things-factory/auth-base": "^4.0.34",
32
- "@things-factory/env": "^4.0.34",
31
+ "@things-factory/auth-base": "^4.0.38",
32
+ "@things-factory/env": "^4.0.38",
33
33
  "aws-sdk": "^2.960.0",
34
34
  "memfs": "^3.0.1",
35
35
  "mime": "^2.4.4",
36
36
  "multer": "^1.3.0"
37
37
  },
38
- "gitHead": "b79919fd02f8388f1d40300c52a25903ad98110c"
38
+ "gitHead": "c2b2638e6efec319d4024cedc8da513d560c126e"
39
39
  }