where to find specific version of aws-java-sdk? - amazon-web-services

I want to download aws-java-sdk-1.9.5, could not find any archive for this jar.
Whatever I am finding is the latest jar from AWS site https://aws.amazon.com/sdk-for-java/
I also checked maven repository but there the available jar is of 2 KBs only that didn't contain any source in the jar.
http://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk/1.9.5
Any suggestion would be appreciated.

You can download from official AWS Repo.
Here is the link for version 1.9.5

The aws-sdk-java JAR contains a list of dependencies on all other JARs in the AWS SDK. If you depend on it, then by Maven's transitive dependency mechanism you will add all of the other SDK JARs to your dependency tree.
Which you do not want to do
I've lost count of the number of individual AWS JARs, but there are a lot -- certainly dozens, possibly as many as a hundred. There's one JAR (at least) per AWS service, most of which you will never use.
A better approach is to download that JAR so that you know the names of the dependencies, then import them individually.

Related

How can I publish serverless application on AWS faster?

I do not know how this question is logic but if there is anyway to solve this issue, it will cause to not waste my time.
I have a ASP.net core application that consist of many libraries like jquery, modernizer and etc. All of them stored in lib folder in wwwroot folder.
When I start publishing on AWS (with AWS Toolkit) it start zipping and publishing on the server as usual.
The point is that it will take a lot of time for zipping all of the libraries. these library does not any change during the project and I just change some pages or classes.
Is there any way to cancel zipping some folders to publish faster?
You can add this in your AWS serverless template to remove unwanted packages from the bundle.
package:
exclude:
- scripts/**
- dynamodb/tables/**
- policies/**
- dynamodb/seeds/**
If you are using a CI/CD methodology then you can ask the code builder to use a script in a root folder structure to run your package resolvers and all. Please refer this documentation

Including aws-java-sdk jar in Production

The only feature of AWS that we are going to use is s3. I have the aws-java-sdk-<ver>.jar which is ~14MB jar. Is there a standalone jar available for just using s3 (I mean the core components and s3 features)?
I looked up on the web, tried combination of names (appended s3 to links etc.) but couldn't find any. However, I stumbled upon this page : JARs for Android. There are feature specific jars for aws on Andorid. I have a feeling that they would have something similar for the regular java sdk as well. Has someone come across that or my only resort is to include the 14 MB jar?
Thanks.
This has been addressed with the AWS SDK for Java 1.9.0 release in the meantime:
Starting from 1.9.0 version, the SDK Maven project got split into multiple Maven modules. It allows you to pick up only a small subset of the SDK according to which AWS services you need to work with.
The split is basically 'one module per service', allowing to import only a core module aws-java-sdk-core, along with the one (or more) service specific module(s) actually needed, e.g. aws-java-sdk-s3.

Make fat jar from the project with fat jar itself, using sbt assembly

I am using sbt-assembly to make my scala project into a fat jar.
This project is using play-json, and AWS SDK.
In the meantime, it is also using DynamoDB Transaction Lib as a fat jar, which is using Jackson and AWS SDK of another version.
When I used sbt assembly to make jar, error came out because of same path of libs between jackson, joda-date and other dependence shared by the AWS SDKs that I used and the ones used by DynamoDB Transaction Lib.
Due to DynamoDB Transaction Lib its own issue, I must use these two versions of both jackson and AWS SDK.
Is there any way to solve it by using merge strategy?
THX in advance!
A fat jar is for deployment only. Using it as a library is a really bad idea.
Due to DynamoDB Transaction Lib its own issue, I must use these two versions of both jackson and AWS SDK.
Are you saying you need to use two different versions of jackson simultaneously? I don't think sbt-assembly can help you with that. Merge strategy can pick one of them.

How do you configure proprietary dependencies for Leiningen?

We're working on a project that has some Clojure-Java interop. At this point we have a single class that has a variety of dependencies which we put into a user library in Eclipse for development, but of course that doesn't help when using Leiningen (2.x). Most of our dependencies are proprietary, so they aren't on a repository somewhere.
What is the easiest/right way to do this?
I've seen leiningen - how to add dependencies for local jars?, but it appears to be out of date?
Update: So I made a local maven repository for my jar following these instructions and the lein deployment docs on github, and edited my project.clj file like this:
:dependencies [[...]
[usc "0.1.0"]]
:repositories {"usc" "file://maven_repository"}
Where maven_repository is under the project directory (hence not using file:///). When I ran "lein deps"--I got this message:
Retrieving usc/usc/0.1.0/usc-0.1.0.pom from usc
Could not transfer artifact usc:usc:pom:0.1.0 from/to usc (file://maven_repository): no supported algorithms found
This could be due to a typo in :dependencies or network issues.
Could not resolve dependencies
What is meant by "no supported algorithms found" and how do I fix it?
Update2: Found the last bit of the answer here.
add them as a dependency to your leiningen project. You can make up the names and versions.
then run lein deps and the error message when it fails to find it will give you the exact command to run so you can install the jar to your local repo then sould you decide to use a shared repo you can use this same process to put your dependencies there.
#Arthur's answer is good but I figured I'd flesh it out a bit more since it leaves some details lacking.
Always keep in mind Repeatability. If you don't make it so that anyone who needs access to the artifacts can get access to the artifacts in a standard way, you're asking for support hell.
The documentation on deployment is a good place to go to find out everything you need to know about deploying your artifacts. Since you're in a polyglot environment you probably can't have lein take care of deploying all your artifacts but at least you can get your clojure specific jars up into S3 or even a file share if you like. The rest of your artifacts will have to use Maven or Ant directly to upload the artifacts to the Maven repo on the file server or S3. At my current company we are using technomancy's excellent s3 wagon private to great effect for hosting our closed source artifacts and clojars for hosting anything that we can open-source.
What #Arthur is referring to is doing a lein install. All that does is install a copy of the current project into your local .m2 directory so that other projects on your box can reference them. Unless you have configured your install of maven to use a shared directory for your .m2 folder (maybe not a bad idea in your environment?), this will mean that anyone else who checks out your project will not be able to build it. If you wanted to go this route, you need to set the localRepository node in your $M2_HOME/conf/settings.xml to be the shared location that the rest of your team has access to. See the docs for more information.
YMMV but I've found it best to use Maven rather than Leiningen when you are working with Polyglot Clojure / Java projects.
It's mainly because the Java based tools (Eclipse etc.) understand Maven projects but don't really understand Leiningen projects. It's getting slowly better with the excellent Counterclockwise Clojure plugin, but the integration still isn't quite good enough yet for an efficient IDE based workflow.
On the repository side of things, I'd suggest setting up a private shared Maven repository. You're going to need it sooner or later if you plan to manage a complex set of dependencies within your team: might as well bite the bullet and get it done now.

How to share a dependency that isn't in Clojars

I need to use the mongo-storm library and Clojars doesn't have it. So I cloned the project, compiled and copied the jar to my lib folder by hand. But it is a team project and it is unacceptable for every member to do those steps by hand.
Are there any better and standard ideas on how to solve this issue?
Your team should have a private repository for this purpose. S3 is an ideal substrate for this, and you can use the s3-wagon-private Leiningen plugin to deploy and consume artifacts to/from a secured S3 bucket:
https://github.com/technomancy/s3-wagon-private
If the project has a license that allows it (if it's open source) you are allowed to push your own unofficial version to Clojars yourself using your own group ID. Clojars reserves the "org.clojars.username" group IDs for this purpose. This is described in https://github.com/ato/clojars-web/wiki/tutorial and https://github.com/technomancy/leiningen/blob/master/doc/DEPLOY.md .
The best way would probably be if you could contact the author and to urge him/her to do a proper release. (Also, the readme doesn't tell what license the project has.)
A solution that doesn't require setting up a private repository would be to leverage the checkouts capability in leiningen.
Ideally, if your team is using a maven based dependency management system (like Leiningen), you would have a repository manager set up. You can then deploy the library to your team's repository manager.
Most repository managers have Maven Central already included and make it easy to both add additional repositories to proxy (e.g. Clojars) and host your own repositories (for mongo-storm and the project being developed).
After getting one set up, one of the things you'll want to make sure your team does is either set as a repository proxy or as an additional repository to pull jars from.
You can find a list of repository managers on the maven site.