sbt-elasticbeanstalk icon indicating copy to clipboard operation
sbt-elasticbeanstalk copied to clipboard

Can't upload to S3

Open Mange opened this issue 11 years ago • 5 comments

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/...

Mange avatar Aug 28 '14 14:08 Mange

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.

sqs avatar Aug 28 '14 16:08 sqs

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

Mange avatar Aug 28 '14 17:08 Mange

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.

sqs avatar Aug 28 '14 22:08 sqs

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.

Mange avatar Aug 29 '14 11:08 Mange

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.

joescii avatar Aug 29 '14 13:08 joescii