Unable to upload application to Amazon S3

2019-05-31 14:22发布

问题:

Using Eclipse, latest version, latest Java AWS SDK I can suddenly no longer deploy to elasticbeanstalk (neither "Run on Server" nor AWS/Deploy to AWS Elastic Beanstalk).

I can export a war file and upload via beanstalk web console w/o problems. It used to work for months and I didn't change anything, credentials are ok. The error message I get is:

Unable to upload application to Amazon S3: AWS authentication requires a valid Date or x-amz-date header (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; Request ID: xxx)

Bump? Searched everywhere... Any help truly welcome!

回答1:

I finally figured it out, may be of help to someone else. The culprit was a script which wouldn't upload with a newer AWS SDK version and Eclipse (worked well within the web console). I could modify and export war file then upload via console. Now I had to remove all aws preferences (Windows: user dir .aws), delete all servers and in Eclipse Run as/Run on Server/Manually choose/choose from AWS list/and then in Next, on the bottom, "import an exsisting environment". Then just leave the dialog and a freshly generated server can then be selected. Thanks everybody for helping!



回答2:

I was experiencing the same issue. My solution:

  1. Remove all aws preferences (Windows: user dir .aws)
  2. Uninstall the AWS Plugins (Help->About->Installation Details). On the installed Software tab, highlight all AWS plugins and select uninstall.
  3. I then Reinstalled required plugins from: http://aws.amazon.com/eclipse and all was well again.

(There were restarting of eclipse between uninstall and reinstall too)

No need to remove the environments and create new ones.



回答3:

Have you recently upgraded your eclipse SDK version?

I had a similar issue however was using the .NET Visual Studio SDK, try re-adding your account credentials within the eclipse plugin and check that you can successfully browse S3.

Steps can be found here: http://docs.aws.amazon.com/AWSToolkitEclipse/latest/GettingStartedGuide/tke_setup_creds.html#adding-your-aws-access-keys-to-the-tke



回答4:

I also had a similar error reported on my eclipse AWS installation on my MacBook Pro.

I had

AWS Toolkit for Eclipse Core (Required) 2.3.1.v201508061154
AWS Elastic Beanstalk 1.0.0.v201508062254

installed.

To fix this, I completely uninstalled all the AWS plugins from eclipse and then added them from the http://aws.amazon.com/eclipse site, and then removed the AWS elastic beanstalk app and environment from the beanstalk server.

In this process, I had to enter my AWS credentials, and setup the AWS server, app and environment. I am now able to deploy my AWS web app from eclipse.