Doefi
Doefi

Reputation: 79

S3 upload error in aws

While uploading my file in the respective path of the bucket using ansible,it shows me error like this:

boto.exception.S3CreateError: S3CreateError: 409 Conflict  
<?xml version="1.0" encoding="UTF-8"?>
  <Error>
    <Code>BucketAlreadyOwnedByYou</Code>
    <Message>Your previous request to create the named bucket succeeded and you already own it.</Message>
    <BucketName>useast1`

here is my code:

      - name: S3 storage
        s3:
          region: "{{ region }}"
          bucket: "{{ bucketname }}"
          object: "{{ path }}/file.json"
          src: "home/ffn/{{ user_name }}/kp_out.json"
          mode: put

Upvotes: 0

Views: 2947

Answers (1)

ILausuch
ILausuch

Reputation: 21

I have ansible version ansible 2.2.1.0

I had the same problem, but after add region it worked

- name: copy to s3
  s3:
    bucket: <myBucket>
    mode: put
    aws_access_key: <myAccess>
    aws_secret_key: <mySecret>
    object: /<pathOnS3>/file.txt
    src: /home/user/file.txt
    permission: public-read
    region: eu-central-1

Upvotes: 2

Related Questions