Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
617 views
in Technique[技术] by (71.8m points)

amazon s3 - Strapi Upload S3 + Localstack

I'm having some trouble to make the strapi-provider-upload-aws-s3 to work with the LocalStack service. The S3 bucket is created correctly but when I try to upload a file via Strapi pointing to the localhost a get an error.

I set the endpoint param in the plugin configuration but didn't work

 upload: {
      provider: 'aws-s3',
      providerOptions: {
        accessKeyId: env('AWS_ACCESS_KEY_ID'),
        secretAccessKey: env('AWS_ACCESS_SECRET'),
        region: env('AWS_REGION'),
        endpoint: env('AWS_S3_ENDPOINT'),
        params: {
          Bucket: env('AWS_S3_BUCKET')
        }
      }

I've tried the following values for the endpoint

  1. localhost:4566
  2. 127.0.0.1:4566
  3. s3.us-east-1.127.0.0.1:4566

I keep getting one of the following errors

  1. error Error: unable to verify the first certificate
  2. error Error: getaddrinfo EBUSY bucket-name.s3.us-east-1.127.0.0.1

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...