sbt-elasticbeanstalk
sbt-elasticbeanstalk copied to clipboard
Can't upload to S3
I get an error when the eb-deploy task is trying to upload the built WAR. Anonymized:
[error] (*:ebUploadSourceBundle)
Status Code: 301,
AWS Service: Amazon S3,
AWS Request ID: 4B092FF1D6A0C108,
AWS Error Code: PermanentRedirect,
AWS Error Message: The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.,
S3 Extended Request ID: Uo0GqhXmRB78RIAYBWBBOFjS0tae3fIB/U7vResO8+[...]
It appears that the hostname must be specific to the environment in which the bucket resides. My bucket is in Ireland, so it needs to access it using http://s3-eu-west-1-amazonaws.com/...
Thanks for reporting this. There are a lot more complications with the S3 bucket URL than I originally knew about. Need to fix. If you are motivate to submit a PR, I would happily merge it.
Fun fact: I'm new to Scala, so I don't understand your code yet. I'd be happy to help if that wasn't the case.
I'm also new to AWS, and that doesn't help at all.
Mange
On Thu, Aug 28, 2014 at 6:44 PM, Quinn Slack [email protected] wrote:
Thanks for reporting this. There are a lot more complications with the S3 bucket URL than I originally knew about. Need to fix. If you are motivate to submit a PR, I would happily merge it.
Reply to this email directly or view it on GitHub: https://github.com/sqs/sbt-elasticbeanstalk/issues/7#issuecomment-53753136
If you just look where it concatenates ebRegion to make the S3 URL, you should be able to hardcode it to the URL it tells you to use in that error message. That should fix it. You're probably using it as a JAR, not from the source, but if you specify the source URL as the sbt plugin, then maybe it would be easier to edit it.
FYI, I am not actively maintaining this anymore, but a few other folks have been performing some maintenance on it.
I'm staying on manual uploads right now. Might convert to some other script (that I understand) in the future if this isn't maintained (and I don't learn more Scala). Thank you for helping me, at least. Hopefully one of the maintainers can sort this out.
We're still using this and maintaining it as needed. If you figure out the changes you need and submit a pull request, I'll check it out and publish an updated version of the plugin.