corley / aws-ant-task Goto Github PK
View Code? Open in Web Editor NEWAnt task implementation for Amazon Web Services
License: MIT License
Ant task implementation for Amazon Web Services
License: MIT License
Maybe this is not the right place for this question, and if so, please close this ticket.
I am wondering if there is a protocol for keeping AWS secret, well, secret from other people when using this ANT task? Imagine: we have a team of people making uploads, but do not want to give everyone a copy of the secret. What would you suggest? Thanks!
I am unable to use s3put to upload files to my bucket.
com.amazonaws.AmazonClientException: Unable to execute HTTP request: bucket-name.s3-us-east-1.amazonaws.com
...
Caused by: java.net.UnknownHostException: bucket-name.s3-us-east-1.amazonaws.com
Do I need to enable Static Website Hosting? Maybe I have used the wrong endpoint address?
bucket-name.s3-website-us-east-1.amazonaws.com
( I used my static website hosting endpoint as a starting point for determining what my endpoint is.)
I am struggling with trying to get S3Get to work. I get as far as this process:
dist:
[s3get] Downloading 'build-cssdk/win-pthreads.zip' to 'dist'
[s3get] Using credentials from ant build file
[s3get] Region s3.amazonaws.com provided
So far I've compiled the latest aws-ant-tasks-0.5-SNAPSHOT.jar and tried using it. Cannot download from my bucket.
Made one change to try to troubleshoot.
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk</artifactId>
<version>1.8.4</version>
Not a Maven/Java coder, so fumbling through.
AmazonS3Exception: Status Code: 404, AWS Service: Amazon S3, AWS Request ID: HIDDEN_FROM_THIS_POST, AWS Error Code: null, AWS Error Message: Not Found, S3 Extended Request ID: HIDDEN_FROM_THIS_POST
at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:679)
at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:350)
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:202)
at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:3001)
at com.amazonaws.services.s3.AmazonS3Client.getObjectMetadata(AmazonS3Client.java:801)
at com.amazonaws.services.s3.AmazonS3Client.getObjectMetadata(AmazonS3Client.java:781)
at com.amazonaws.services.s3.transfer.TransferManager.download(TransferManager.java:478)
at com.amazonaws.services.s3.transfer.TransferManager.download(TransferManager.java:456)
at it.corley.ant.S3GetTask.downloadFile(S3GetTask.java:65)
at it.corley.ant.S3GetTask.execute(S3GetTask.java:39)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.Main.runBuild(Main.java:851)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Usign fileset strategy to invalidate objects
Trying to use s3put to upload some files, but hitting a wall. Suggestions? Here is what ANT says:
s3put
Region US given but not found in the region to endpoint map. Will use it as an endpoint
Uploading 1 file(s) from C:\dev\my_js\build
Oct 30, 2012 5:51:43 PM com.amazonaws.http.AmazonHttpClient executeHelper
WARNING: Unable to execute HTTP request: my-bucket.US
C:\dev\my_js\ant\build.xml:49: com.amazonaws.AmazonClientException: Unable to execute HTTP request: my-bucket.US
Windows 7, JRE1.6.0_27
Hi,
could someone please reup the 1.3 jar file...
I got the 1.2 file running, but it seems to miss a few functions.
i´m a total noob an can´t get the 1.3 compiled :(
Hi, great task...
Following docs in README, woudl expect the following config to work:
<s3put endpoint="s3-eu-west-1.amazonaws.com"
key="${s3.access.key}"
secret="${s3.secret.key}"
bucket="${AWS_BUCKET}"
dest=""
cachecontrol="max-age=60">
<cachecontrol extension=".js" maxage="86400"/>
<fileset dir="${dir.deploy}" includes="**/*" />
</s3put>
but getting...
s3put doesn't support the nested "cachecontrol" element.
Am I misusing?
Thanks
Currently cache control is accepting only integer values used for max-age:
https://github.com/corley/aws-ant-task/blob/master/src/main/it/corley/ant/S3PutTask.java#L216
Cache control header could be more than just max-age in general case, you currently cannot set something like:
Cache-Control: max-age=3600, must-revalidate
List of possible values (scroll to 14.9):
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
Possible solution could be checking if passed value is integer then using it as max-age value (to not break old codebase), otherwise just pass the value as is without prepending max-age for full flexibility.
Just applied a patch proposed by Pepijn Schmitz.
Pepijn Schmitz:
I made some changes to the S3PutTask class so that it supports putting
objects in the root (as well as making the destination handling slightly
more intuitive). I also added support for storing objects with reduced
redundancy.
Would be helpful to add a contentEncoding attribute for uploading to s3.
This would make it easy to upload gzipped javascript [ see http://stackoverflow.com/a/5447158/62255 ]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.