Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-44305

Can't use credentials to upload file to s3

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • pipeline-aws-plugin
    • None

      Hi,
      I've tried to use access key and secret key to upload a file to s3, but always get access denied.

      Here is how i use it in Jenkins pipeline?

      withAWS(credentials:'MBJDG7W2TGY7NMFIDEA, mja8D0KB15yGljoktC8Yuluxd2NMM0madu94nbzi',region:'us-east-1') {
      s3Upload(file : "$build_log_file", bucket : 'mybuild1'', path : "$s3_bucket_dir/$thisbuild_logfile")
      }

      and the error message that i get is:

      com.amazonaws.services.s3.model.AmazonS3Exception: Access Denied (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; Request ID: BAD0CC151E87F0EB), S3 Extended Request ID: XoMburAWmRThQgQJQzA99F3I+CJJb0by/4uMPomVZRqVAFwlGAboCJl7WxYvDjrIWhOysC3Awn8=
      at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1545)
      at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1183)
      at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:964)
      at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:676)

            hoegertn Thorsten Hoeger
            g2345c hb nguyen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: