S3 upload fails with null param awsSecretAccessKey

Dan Webb's Avatar

Dan Webb

29 Jun, 2016 08:33 AM

In our appveyor.yml we're uploading an artifact to S3 on build. But it fails with:

Deploying using S3 provider
Value cannot be null.
Parameter name: awsSecretAccessKey

We've set the secret_key and access_key in the appveyor yaml. The secret_key uses a secure variable like so:

deploy:
  provider: S3
  access_key_id: foo
  secret_access_key:
    secure: encrypted-bar
  bucket: baz
  artifact: "cookbook-{build}.tar.gz"
  on:
    branch: master
  1. Support Staff 1 Posted by Feodor Fitsner on 29 Jun, 2016 05:43 PM

    Feodor Fitsner's Avatar

    Hi Dan,

    Make sure the key was encrypted under the same AppVeyor account that is running build. Each AppVeyor account has its own unique encryption key.

  2. 2 Posted by Dan Webb on 30 Jun, 2016 09:01 AM

    Dan Webb's Avatar

    Ah, so the account that is running it, is a shared account. Or do I need the account that created the org to do it?

  3. 3 Posted by Dan Webb on 30 Jun, 2016 10:59 AM

    Dan Webb's Avatar

    OK, that was indeed the case.

    When that person leaves the company what's the best way of dealing with that?

    On a similar note with S3 upload, our bucket is in the eu-west region. Is there a way to specify an eu-west bucket instead of the default?
    The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.

    According to the docs there isn't an option for this yet.

    Access key ID (access_key_id) - AWS account access key.
    Secret access key (secret_access_key) - AWS secret access key.
    Bucket name (bucket) - the name of bucket to copy artifacts to.
    Folder (folder) - name of folder to copy to.
    Artifact (artifact) - name of artifact to copy.
    
  4. Support Staff 4 Posted by Feodor Fitsner on 30 Jun, 2016 03:16 PM

    Feodor Fitsner's Avatar

    Yes, you can specify region as:

    region: eu-west-1
    

    I'll update docs to reflect that.

  5. 5 Posted by Dan Webb on 30 Jun, 2016 09:15 PM

    Dan Webb's Avatar

    Excellent, thanks!

  6. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:06 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac