S3 Storage Guide - cloud-barista/cb-spider GitHub Wiki
- CB-Spider๋ ๋ฉํฐ ํด๋ผ์ฐ๋ Object Storage๋ฅผ AWS S3 ํ์ค ๋ฐฉ๋ฒ ๋ฐ API๋ฅผ ์ด์ฉํ์ฌ ๋์ผํ ํ์์ผ๋ก ๊ด๋ฆฌํ ์ ์๋ค.
- ์ฌ์ฉ์๋ Bucket์ ์์ฑํ๊ณ , ์์ฑํ Bucket์ Object(ํ์ผ)์ ์ ์ผํ Key๋ฅผ ๋ถ์ฌํ์ฌ ์ ์ฅ ๋ฐ ๊ด๋ฆฌํ ์ ์๋ค.
- ์ฌ์ฉ์๋ ์ฌ๋ฌ ๊ฐ์ Bucket์ ์์ฑ ๊ด๋ฆฌํ ์ ์์ผ๋ฉฐ, ํ๋์ Bucket์๋ ์ฌ๋ฌ ๊ฐ์ Key:Object๋ฅผ ์ ์ฅ ๊ด๋ฆฌํ ์ ์๋ค.

2. S3 Storage ์ ๊ณต ๊ธฐ๋ฅ ๋ฐ ์ง์ CSP ํํฉ (v0.11.0 ๊ธฐ์ค)
- ๋ฐฐํฌ ๊ธฐ๋ฅ: Bucket ์์ฑ/์ญ์ , ๋ฉํฐ ํ์ผ ์ ๋ก๋/๋ค์ด๋ก๋/์ญ์ , Object Version ๊ด๋ฆฌ
- ๋ฐฐํฌ CSP: AWS, IBM VPC, KT VPC
- CSP๋ณ ์ํ ํํฉ
Bucket ์์ฑ |
๋ฉํฐ ํ์ผ ์
๋ก๋ (5MB, 1GB) |
ํ์ผ ๋ค์ด๋ก๋ (1GB) |
๋ฉํฐ ํ์ผ ์ญ์ | Versioning | Bucket ์ญ์ | v0.11.0 ๋ฐฐํฌ CSP |
|
---|---|---|---|---|---|---|---|
AWS | O | O | O | O | O | O | O |
IBM VPC | O | O | O | O | O | O | O |
KT VPC | O | O | O | O | O | O | O |
GCP | O | O | O | X (ํ๊ฐ์ฉ๋ง ์ญ์ ๊ฐ๋ฅ) | X (version ๋ชฉ๋ก ์๋ณด์) | O | |
Alibaba | O | O | O | O | X (empty ์๋ฃ ํ, bucket ์ญ์ ๊ฐ ์๋จ) | O | |
NCP VPC | O | O | O | O | X (enable ์ค์ ์๋จ) | O | |
NHN | O | O | O | O | X (enable ์ค์ ์๋จ) | O |
-
์ง์ ๋๊ธฐ ์ค์ธ CSP
- Azure: S3 ๋นํธํ => Driver ๊ตฌํ ์์
- Tencent: S3 ์ผ๋ถ ํธํ => ListObjects, Delete Bucket ๋ฑ ์ผ๋ถ API ์ค๋ฅ ๋ถ์์ค
- OpenStack: ํ๊ฒฝ ๋ถ์ฌ๋ก ํ ์คํธ ๋ถ๊ฐ => ํ๊ฒฝ ์ค๋น ์ค
3. S3 Storage API (v0.11.0 ๊ธฐ์ค)
-
CB-Spider S3 Storage API๋ AWS S3 ํ์ค API๋ฅผ ์ค์ํ๋ค.
-
CB-Spider S3 Storage API๋ Spider Connection ์ค์ ์ ์ด์ฉํ ์ธ์ฆ์ ์ ๊ณตํ๋ค.
- ์ฌ์ ์ค์ ์ผ๋ก Connection ์ค์ ์ด ์ฌ์ฉํ๋ Credential์ S3 ์ธ์ฆ ์ ๋ณด๋ฅผ ์ถ๊ฐํด์ผ ํ๋ค.
-
CB-Spider S3 Storage๋ Connection ์ค์ ์ ์ด์ฉํ์ฌ ๋ค์๊ณผ ๊ฐ์ด 2๊ฐ์ง ํํ์ ํ์ค API๋ฅผ ์ ๊ณตํ๋ค.
- AWS S3 ํ์ค API:
curl -X PUT "http://localhost:1024/spider-bucket-111" \ -H "Authorization: AWS4-HMAC-SHA256 Credential=aws-config01"
- CB-Spider S3 ํ์ค API:
curl -X PUT "http://localhost:1024/spider-bucket-112?ConnectionName=aws-config01"
-
API ๋ฐํ ํฌ๋งท
- ํ์ฌ XML ํ์ ์ ๊ณต
- ์ถํ JSON ์ต์ ์ ๊ณต ์์
-
4. S3 Storage ์ค์ ๊ฐ์ด๋ (v0.11.0 ๊ธฐ์ค)
-
์ฐ๋ ๋์ CSP Console์์ Object Storage ์ฌ์ฉ enable ๋ฐ ๊ถํ ์ค์
-
๊ธฐ์กด CB-Spider Connection์ Credential ์ ๋ณด์ ๋ค์ S3 ๊ด๋ จ ์ ๋ณด ์ถ๊ฐ ํ์
S3Endpoint S3AccessKey S3SecretKey S3UseSSL S3RegionRequired
-
๊ธฐ์กด Compute Credential ์ค์ ๋ฐฉ๋ฒ ์์
curl -X POST http://$RESTSERVER:1024/spider/credential \ -H 'Content-Type: application/json' \ -d '{ "CredentialName": "aws-credential01", "ProviderName": "AWS", "KeyValueInfoList": [ {"Key": "aws_access_key_id", "Value": "***"}, {"Key": "aws_secret_access_key", "Value": "***"} ] }'
-
์ ๊ท S3 Credential ํฌํจํ ์ค์ ๋ฐฉ๋ฒ ์์
curl -X POST http://$RESTSERVER:1024/spider/credential \ -H 'Content-Type: application/json' \ -d '{ "CredentialName": "aws-credential01", "ProviderName": "AWS", "KeyValueInfoList": [ {"Key": "aws_access_key_id", "Value": "***"}, {"Key": "aws_secret_access_key", "Value": "***"}, {"Key": "S3Endpoint", "Value": "s3.{region}.amazonaws.com"}, {"Key": "S3AccessKey", "Value": "***"}, {"Key": "S3SecretKey", "Value": "***"}, {"Key": "S3UseSSL", "Value": "true"}, {"Key": "S3RegionRequired", "Value": "true"} ] }'
-
CSP๋ณ S3 ์ธ์ฆ ์ ๋ณด ์ฐธ๊ณ (
๋ณ๋ ๋ฐ๊ธ
: ๋์ CSP Console Object Storage์์ ๋ฐ๊ธ)
CSP | S3Endpoint Format | S3AccessKey | S3SecretKey | S3UseSSL | S3RegionRequired |
---|---|---|---|---|---|
AWS | s3.{region}.amazonaws.com | aws_access_key_id์ ๋์ผ | aws_secret_access_key์ ๋์ผ | true | true |
GCP | storage.googleapis.com | ๋ณ๋ ๋ฐ๊ธ | ๋ณ๋ ๋ฐ๊ธ | true | true |
Alibaba | oss-{region}.aliyuncs.com | ClientId์ ๋์ผ | ClientSecret์ ๋์ผ | true | false |
IBM VPC | s3.{region}.cloud-object-storage.appdomain.cloud | ๋ณ๋ ๋ฐ๊ธ | ๋ณ๋ ๋ฐ๊ธ | true | false |
NCP VPC | {region}.object.ncloudstorage.com | ClientId์ ๋์ผ | ClientSecret์ ๋์ผ | true | false |
NHNCloud | {region}-api-object-storage.nhncloudservice.com | ๋ณ๋ ๋ฐ๊ธ | ๋ณ๋ ๋ฐ๊ธ | true | true |
KTCloud VPC | obj-e-1.ktcloud.com | ๋ณ๋ ๋ฐ๊ธ | ๋ณ๋ ๋ฐ๊ธ | true | false |
- ์ฐธ๊ณ : CSP๋ณ S3 ์ธ์ฆ ์ค์ ์ ํ์ฉ ํฌ๋งท
[AWS] {"Key": "S3Endpoint", "Value": "s3.{region}.amazonaws.com"}, {"Key": "S3AccessKey", "Value": "***"}, // aws_access_key_id์ ๋์ผ {"Key": "S3SecretKey", "Value": "***"}, // aws_secret_access_key์ ๋์ผ {"Key": "S3UseSSL", "Value": "true"}, {"Key": "S3RegionRequired", "Value": "true"} [GCP] {"Key": "S3Endpoint", "Value": "storage.googleapis.com"}, {"Key": "S3AccessKey", "Value": "***"}, // ๋ณ๋ ๋ฐ๊ธ {"Key": "S3SecretKey", "Value": "***"}, // ๋ณ๋ ๋ฐ๊ธ {"Key": "S3UseSSL", "Value": "true"}, {"Key": "S3RegionRequired", "Value": "true"} [Alibaba] {"Key": "S3Endpoint", "Value": "oss-{region}.aliyuncs.com"}, {"Key": "S3AccessKey", "Value": "***"}, // ClientId์ ๋์ผ {"Key": "S3SecretKey", "Value": "***"}, // ClientSecret๊ณผ ๋์ผ {"Key": "S3UseSSL", "Value": "true"}, {"Key": "S3RegionRequired", "Value": "false"} [IBM VPC] {"Key": "S3Endpoint", "Value": "s3.{region}.cloud-object-storage.appdomain.cloud"}, {"Key": "S3AccessKey", "Value": "***"}, // ๋ณ๋ ๋ฐ๊ธ {"Key": "S3SecretKey", "Value": "***"}, // ๋ณ๋ ๋ฐ๊ธ {"Key": "S3UseSSL", "Value": "true"}, {"Key": "S3RegionRequired", "Value": "false"}]}' [NCP VPC] {"Key": "S3Endpoint", "Value": "{region}.object.ncloudstorage.com"}, {"Key": "S3AccessKey", "Value": "***"}, // ClientId์ ๋์ผ {"Key": "S3SecretKey", "Value": "***"}, // ClientSecret๊ณผ ๋์ผ {"Key": "S3UseSSL", "Value": "true"}, {"Key": "S3RegionRequired", "Value": "false"} [NHNCloud] {"Key": "S3Endpoint", "Value": "{region}-api-object-storage.nhncloudservice.com"}, {"Key": "S3AccessKey", "Value": "***"}, // ๋ณ๋ ๋ฐ๊ธ {"Key": "S3SecretKey", "Value": "***"}, // ๋ณ๋ ๋ฐ๊ธ {"Key": "S3UseSSL", "Value": "true"}, {"Key": "S3RegionRequired", "Value": "true"} [KTCloud VPC] {"Key": "S3Endpoint", "Value": "obj-e-1.ktcloud.com"}, {"Key": "S3AccessKey", "Value": "***"}, // ๋ณ๋ ๋ฐ๊ธ {"Key": "S3SecretKey", "Value": "***"}, // ๋ณ๋ ๋ฐ๊ธ {"Key": "S3UseSSL", "Value": "true"}, {"Key": "S3RegionRequired", "Value": "false"}
- Connection ์ ํ
- S3 ๊ด๋ฆฌ ํ์ด์ง๋ก ์ด๋
- S3 ๊ด๋ฆฌ ์ฃผ์ ๊ธฐ๋ฅ์ ๋ค์๊ณผ ๊ฐ๋ค
- (1) Bucket ์์ฑ
- (2) ์์ฑํ Bucket ์ ๋ณด ์ ๊ณต ๋ฐ ์ ํ
- (3) ์ ํํ Bucket์ Object ์ ์ฅ
- (4) ์ ์ฅํ Object ์ ๋ณด ์ ๊ณต
- (5) ์ ์ฅํ Object ๋ค์ด๋ก๋
- (6) ์ ์ฅํ Object PreSigned URL ์์ฑ
- (7) ํ์ฌ Bucket์ Object๋ค์ Version ๊ด๋ฆฌ ์ ๊ณต ์ฌ๋ถ ์ ํ
- (8) Versioning ์ ํํ Bucket์ ๊ฒฝ์ฐ Objecet๋ค์ ๋ํ Version ๊ด๋ฆฌ
- (9) ํ์ฌ Bucket์ CORS ์ค์ ๋ฐ ์ญ์

-
Bucket ์์ฑ
- S3 ํ์ค ๋ฐฉ๋ฒ
curl -X PUT "http://localhost:1024/spider-bucket-111" \ -H "Authorization: AWS4-HMAC-SHA256 Credential=aws-config01"
- Spider ํ์ค ๋ฐฉ๋ฒ
curl -X PUT "http://localhost:1024/spider-bucket-112?ConnectionName=aws-config01"
-
Bucket ๋ชฉ๋ก
- S3 ํ์ค ๋ฐฉ๋ฒ
curl -X GET "http://localhost:1024/" \ -H "Authorization: AWS4-HMAC-SHA256 Credential=aws-config01" <?xml version="1.0" encoding="UTF-8"?> <ListAllMyBucketsResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <Owner> <ID>aws-config01</ID> <DisplayName>aws-config01</DisplayName> </Owner> <Buckets> <Bucket> <Name>spider-bucket-111</Name> <CreationDate>2025-07-18T14:11:05Z</CreationDate> </Bucket> <Bucket> <Name>spider-bucket-112</Name> <CreationDate>2025-07-18T14:11:26Z</CreationDate> </Bucket> </Buckets> </ListAllMyBucketsResult>
- Spider ํ์ค ๋ฐฉ๋ฒ
curl -X GET "http://localhost:1024?ConnectionName=aws-config01" <?xml version="1.0" encoding="UTF-8"?> <ListAllMyBucketsResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <Owner> <ID>aws-config01</ID> <DisplayName>aws-config01</DisplayName> </Owner> <Buckets> <Bucket> <Name>spider-bucket-111</Name> <CreationDate>2025-07-18T14:11:05Z</CreationDate> </Bucket> <Bucket> <Name>spider-bucket-112</Name> <CreationDate>2025-07-18T14:11:26Z</CreationDate> </Bucket> </Buckets> </ListAllMyBucketsResult>
- ์ค์น ๋ฐ ์ฌ์ฉ ๋ฐฉ๋ฒ ๋ฑ์ S3 Browser ์ฐธ๊ณ
- CB-Spider Account ์ค์ ๋ฐฉ๋ฒ์ ๋ค์๊ณผ ๊ฐ๋ค.
-
Account
:S3 Compatible Storage
์ ํ -
API
:localhost:1024
์ ๋ ฅ -
Access Key
:connection name
์ ๋ ฅ -
Secret Access
: ์๋ฌดํค๋ ์ ๋ ฅ -
Use secure transfer (SSL/TLS)
: unCheck
-
