S3 Storage Guide - cloud-barista/cb-spider GitHub Wiki

1. CB-Spider S3 Storage ๊ฐœ์š”

  • CB-Spider๋Š” ๋ฉ€ํ‹ฐ ํด๋ผ์šฐ๋“œ Object Storage๋ฅผ AWS S3 ํ‘œ์ค€ ๋ฐฉ๋ฒ• ๋ฐ API๋ฅผ ์ด์šฉํ•˜์—ฌ ๋™์ผํ•œ ํ˜•์ƒ์œผ๋กœ ๊ด€๋ฆฌํ•  ์ˆ˜ ์žˆ๋‹ค.
  • ์‚ฌ์šฉ์ž๋Š” Bucket์„ ์ƒ์„ฑํ•˜๊ณ , ์ƒ์„ฑํ•œ Bucket์— Object(ํŒŒ์ผ)์„ ์œ ์ผํ•œ Key๋ฅผ ๋ถ€์—ฌํ•˜์—ฌ ์ €์žฅ ๋ฐ ๊ด€๋ฆฌํ•  ์ˆ˜ ์žˆ๋‹ค.
  • ์‚ฌ์šฉ์ž๋Š” ์—ฌ๋Ÿฌ ๊ฐœ์˜ Bucket์„ ์ƒ์„ฑ ๊ด€๋ฆฌํ•  ์ˆ˜ ์žˆ์œผ๋ฉฐ, ํ•˜๋‚˜์˜ Bucket์—๋Š” ์—ฌ๋Ÿฌ ๊ฐœ์˜ Key:Object๋ฅผ ์ €์žฅ ๊ด€๋ฆฌํ•  ์ˆ˜ ์žˆ๋‹ค.

image

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 ์˜ต์…˜ ์ œ๊ณต ์˜ˆ์ •
  • [AWS S3 ํ‘œ์ค€ API์™€ CB-Spider S3 ํ‘œ์ค€ API ๋น„๊ต


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"}
    

5. CB-Spider AdminWeb์„ ์ด์šฉํ•œ S3 Storage ํ™œ์šฉ ์˜ˆ์‹œ

  • 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 ์„ค์ • ๋ฐ ์‚ญ์ œ
image

6. CB-Spider S3 Storage API ํ™œ์šฉ ์˜ˆ์‹œ

  • 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>
    

7. S3 Browser S3 ํƒ์ƒ‰ ๋„๊ตฌ๋ฅผ ์ด์šฉํ•œ CB-Spider S3 Storage ํ™œ์šฉ ์˜ˆ์‹œ

  • ์„ค์น˜ ๋ฐ ์‚ฌ์šฉ ๋ฐฉ๋ฒ• ๋“ฑ์€ S3 Browser ์ฐธ๊ณ 
  • CB-Spider Account ์„ค์ • ๋ฐฉ๋ฒ•์€ ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค.
    • Account: S3 Compatible Storage ์„ ํƒ
    • API: localhost:1024 ์ž…๋ ฅ
    • Access Key: connection name ์ž…๋ ฅ
    • Secret Access: ์•„๋ฌดํ‚ค๋‚˜ ์ž…๋ ฅ
    • Use secure transfer (SSL/TLS): unCheck
image

โ€ป ์ฐธ๊ณ : AWS S3 Reference

โš ๏ธ **GitHub.com Fallback** โš ๏ธ