I'm having a very similar issue.
I see the billing csv file.
My S3 bucket is all lower case.
My S3 bucket matches what I've put in local/aws.conf.
When I run get_bill.py, I receive the following error:
Traceback (most recent call last):
File "./get_bill.py", line 4, in ?
import os, sys, boto.ec2, calendar, datetime,time, ConfigParser,
boto, csv File
"/opt/splunk/etc/apps/SplunkAppforAWS/bin/boto/init.py",
line 28, in ?
from boto.storage_uri import BucketStorageUri, FileStorageUri
File
"/opt/splunk/etc/apps/SplunkAppforAWS/bin/boto/storage_uri.py",
line 27, in ?
from boto.s3.deletemarker import DeleteMarker File
"/opt/splunk/etc/apps/SplunkAppforAWS/bin/boto/s3/init.py",
line 52
from .connection import S3Connection
^ SyntaxError: invalid syntax
When I look at /opt/splunk/etc/apps/SplunkAppforAWS/bin/boto/s3/init.py line 52:
*def regions():
"""
Get all available regions for the Amazon S3 service.
:rtype: list
:return: A list of :class:`boto.regioninfo.RegionInfo`
"""
from .connection import S3Connection
return [S3RegionInfo(name='us-east-1',
endpoint='s3.amazonaws.com',
connection_cls=S3Connection),*
Is there a typo at the ".connection" line?
Changing the line to:
from connection import S3Connection*
Resolves the error. But, then there's a further error with boto ec2:
Traceback (most recent call last):
File "./get_bill.py", line 4, in ?
import os, sys, boto.ec2, calendar, datetime,time, ConfigParser, boto, csv
File "/opt/splunk/etc/apps/SplunkAppforAWS/bin/boto/ec2/init.py", line 26, in ?
from boto.ec2.connection import EC2Connection
File "/opt/splunk/etc/apps/SplunkAppforAWS/bin/boto/ec2/connection.py", line 3452
'true' if enable_dns_support else 'false')
^
SyntaxError: invalid syntax
Maybe the Splunk App for AWS needs an update to the version of boto packaged with it?
Downloading the latest boto and replacing the one installed with the app resolved this issue.
... View more