Я пытаюсь загрузить тарбол в S3 bucket через Maven. В моем файле POM у меня есть:
<!-- upload the war file from our repository -->
<execution>
<phase>deploy</phase>
<goals>
<goal>java</goal>
</goals>
<id>upload-war</id>
<configuration>
<includeProjectDependencies>true</includeProjectDependencies>
<includePluginDependencies>true</includePluginDependencies>
<classpathScope>runtime</classpathScope>
<executableDependency>
<groupId>net.java.dev.jets3t</groupId>
<artifactId>jets3t</artifactId>
</executableDependency>
<mainClass>org.jets3t.apps.synchronize.Synchronize</mainClass>
<arguments>
<argument>--nodelete</argument>
<argument>--properties</argument>
<argument>${project.basedir}/aws.properties</argument>
<argument>UP</argument>
<argument>${aws.s3.release-bucket}</argument>
<argument>${stack.war}</argument>
</arguments>
</configuration>
</execution>
В файле свойств aws.properties
у меня есть accesskey
и secretkey
для моей учетной записи AWS.
Я получаю следующую ошибку:
SEVERE: A thread failed with an exception. Firing ERROR event and cancelling all threads
org.jets3t.service.ServiceException: S3 Error Message. GET '/' on Host 'fs-ug-cloudformation.s3.amazonaws.com' @ 'Tue, 28 Aug 2018 02:00:18 GMT' -- ResponseCode: 400, ResponseStatus: Bad Request, XML Error Message:
<?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>InvalidRequest</Code>
<Message>The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.</Message>
<RequestId>BF901EF5C1FAD735</RequestId>
<HostId>...</HostId>
</Error>
Я попытался добавить свойства region
и signature_version
, но все равно получил ту же ошибку. Я знаю, что мой регион ca-central-1a
требует AWS4-HMAC-SHA2561
аутентификации.
Я что-то упустил?