S3 uyumlu storage
AWS CLI ile Object Storage
Bucket ve access key panel, API veya cdnctl ile oluşturulduktan sonra public S3 uyumlu endpoint üzerinden AWS CLI kullanılabilir.
Platform yardımına dönCredential hazırla
Önce bucket ve access key oluşturun. Secret access key yalnızca bir kez gösterilir; güvenli saklanmalı, dokümana veya ticketa yazılmamalıdır.
cdnctl object-storage buckets create --account <account_uuid> --name app-media
cdnctl object-storage access-keys create --account <account_uuid> --bucket <bucket_uuid>
AWS CLI configure
Her AWS CLI komutunda CDN.com.tr endpoint’i kullanılmalıdır. Checksum değişkenleri modern AWS CLI v2 ile mevcut CDN edge ve RGW path uyumluluğunu korur.
aws configure --profile cdn-object-storage
export AWS_REQUEST_CHECKSUM_CALCULATION=when_required
export AWS_RESPONSE_CHECKSUM_VALIDATION=when_required
aws --profile cdn-object-storage --endpoint-url https://s3.cdn.com.tr s3api list-buckets
Object smoke test
Uygulamayı bucket’a bağlamadan önce küçük bir yazma/okuma/silme testi çalıştırın.
echo "cdn smoke" > smoke.txt
aws --profile cdn-object-storage --endpoint-url https://s3.cdn.com.tr s3api put-object --bucket <bucket> --key smoke.txt --body ./smoke.txt
aws --profile cdn-object-storage --endpoint-url https://s3.cdn.com.tr s3api head-object --bucket <bucket> --key smoke.txt
aws --profile cdn-object-storage --endpoint-url https://s3.cdn.com.tr s3 cp s3://<bucket>/smoke.txt -
aws --profile cdn-object-storage --endpoint-url https://s3.cdn.com.tr s3api delete-object --bucket <bucket> --key smoke.txt
Troubleshooting
- 403 genellikle access key, bucket sahipliği, policy veya signature scope uyuşmazlığıdır.
- SignatureDoesNotMatch genellikle endpoint, region/profile, secret key veya komut imzalama bağlamı hatasıdır.
- put-object çalışıp head-object hata verirse bucket/key sahipliğini ve CDN S3 passthrough route ayarını kontrol edin.
- Public endpoint https://s3.cdn.com.tr olmalıdır. Müşteriler internal RGW adreslerini kullanmamalıdır.