All Apps and Add-ons

AWS billing bucket conflict

anewell
Path Finder

I am trying to get the AWS app working, and I'm finding the "documentation" to be... delphic.
For the billing aspect - When I manually run the get_bill.py script, it returns:

 [root@host local]# $SPLUNK_HOME/bin/splunk cmd $SPLUNK_HOME/etc/apps/SplunkAppforAWS/bin/get_bill.py
    Traceback (most recent call last):
      File "/opt/splunk/etc/apps/SplunkAppforAWS/bin/get_bill.py", line 45, in <module>
        a = conn.create_bucket(s3bucket1)
      File "/opt/splunk/etc/apps/SplunkAppforAWS/bin/boto/s3/connection.py", line 499, in create_bucket
        response.status, response.reason, body)
    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>billbucket</BucketName><RequestId>XXXXXXEDFB3E00AB</RequestId><HostId>XXXXXXxXOBGQyAP5Qpj1qIgXXXXXO+kJ0bk6hU7Wo7/F1uZZVvXXXXXXhi5+uHpUYzza9</HostId></Error>

My s3 bucket exists, is named in lowercase, and contains billing csv files that match the regex in the script. (As an aside, it's puzzling that a script which intends to gather and parse CSV files would attempt to create an S3 bucket, but there it is.)

How do I make this work?

Environment: Splunk 6.0.1 (build 189883) on CentOS release 6.5 (Final), and no luck with Windows 2008R2, either.

Tags (1)
0 Karma

anewell
Path Finder

Well, I solved my problem, but I'm still puzzled by the original design, and I've learned an important lesson: Don't deliver "Community Supported" Splunk apps to your executives.

I have an existing S3 bucket where billing data is being delivered (the data is being consumed by other parties, and so cannot be moved). The "get_bill.py" script delivered from Splunkbase tries to create a new bucket, and this was colliding with my existing bucket. The fix is to change the boto call from create to get on line 45 of get_bill.py:

 a = conn.create_bucket(s3bucket1)

becomes

a = conn.get_bucket(s3bucket1)

liork1
Engager

I cannot agree more on the "delivering to executives" statement!

I'm still struggling with the configuration and still getting errors. I'm stuck at line 41 🙂

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...