We are currently developing AWS Lambda in java an using AWS Java SDK.
Found that AWS SDK is available in 2 packages ... but could not locate the difference and which one is better (or what is purpose of having two).
Would appreciate if somebody can throw some light on this.
to be exact ... The AWS api can be used using
import com.amazonaws.*
and
import software.amazon.awssdk.*
~ thank you
There are two versions of the Java SDK. The package com.amazonaws is version 1, software.amazon.awssdk is version 2.
AWS would very much like you to use version 2.
You can get more information here: https://docs.aws.amazon.com/sdk-for-java/
Related
I have an AWS Lambda and am creating a simple C++ application to call it.
Based on the AWS Docs, I went and installed the SDK here https://github.com/aws/aws-sdk-cpp but that seems to add nearly a full GB if I include the whole thing.
Is there something like boto3 for C++?
If not, what is the accepted best way of integrating Lambda calls into a small C++ application?
Is there something like boto3 for C++?
That's literally the thing you linked to. Boto3 is the AWS SDK for Python. This is the AWS SDK for C++.
What you are missing is that you can install just the packages you need from the SDK, instead of the full SDK.
Ours is a Spring-Boot based application. For integration with AWS SNS and SQS, we have couple of options:
Use Spring-Cloud-AWS
Use AWS-SDK-Java 2
I wanted to know if there is any advantage in using one or the other.
When I ask AWS guys, they tell me that AWS SDK gets updated regularly and integration with SNS and SQS is not difficult. Hence, there is no need to integrate with Spring-Cloud-AWS.
I tried searching on gitter channel for Spring-Cloud and could not find any relevant information. Documentation does state that I can update the AWS-SDK version. Documentation does not state any compelling reason for not using AWS-SDK directly.
If anyone has some insights, please share.
From the AWS Spring Team:
"From now on, our efforts focus on 3.0 - based on AWS SDK 2.0."
So, if you need AWS SDK 2.0, you probably want to go directly with the SDK.
https://spring.io/blog/2021/03/17/spring-cloud-aws-2-3-is-now-available
For more on what's new on AWS Java SDK 2.0:
https://aws.amazon.com/blogs/developer/aws-sdk-for-java-2-0-developer-preview/
The main advantage over the AWS Java SDK is the Spring style convenience and head start we get by using the Spring project. As per the project documentation (https://cloud.spring.io/spring-cloud-aws/reference/html/##using-amazon-web-services)
Using the SDK, application developers still have to integrate the SDK
into their application with a considerable amount of infrastructure
related code. Spring Cloud AWS provides application developers already
integrated Spring-based modules to consume services and avoid
infrastructure related code as much as possible.
when using cost explorer client in lambda function , 'ce' is not supported. but it may available in new version of botocore. so is it possible to import the new version of botocore in lambda python function ? if yes, how we can implement it. please provide some example
AWS Lambda provides a way to to use a version of Boto3 other than the one included by default, you can include it in your deployment package.
From Creating a Deployment Package (Python)
AWS Lambda includes the AWS SDK for Python (Boto 3), so you don't need
to include it in your deployment package. However, if you want to use
a version of Boto3 other than the one included by default, you can
include it in your deployment package.
I am trying to create a rule without using the UI provided by AWS but using the java sdk. Looking over the codes of the java sdk I have not seen any codes that creates rule. Any help would be appreciated.
After painful research and posting questions in aws forum, I have found out that there is no way you can create a custom rule gui by installing it from here but you have to follow this approach .You can find how to here
Here are some docs that may help you as well
link 1
link 2
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.