Git Product home page Git Product logo

awsdocs / aws-java-developer-guide Goto Github PK

View Code? Open in Web Editor NEW
116.0 42.0 86.0 2.47 MB

Official repository of the AWS SDK for Java Developer Guide -- issues and contributions are welcome, see README for details.

Home Page: http://docs.aws.amazon.com/java-sdk/latest/developer-guide/welcome.html

License: Other

Makefile 100.00%
aws java documentation howto programming sdk restructuredtext sphinx-documentation

aws-java-developer-guide's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aws-java-developer-guide's Issues

SDK samples refer to master instead of 1.11.22

The sdk samples take you to master which has the Builder API which was not available to me, the documentation needs to point to the rightv version of the documentation which one can use with scala.

This did not work: https://github.com/aws/aws-sdk-java/tree/master/src/samples

This worked: https://github.com/aws/aws-sdk-java/tree/1.11.22/src/samples

Also, the scala example is out of date. Please update the docs as they are very misleading and not beginner friendly https://aws.amazon.com/blogs/compute/writing-aws-lambda-functions-in-scala/

Guide for Lambda as Activities

I'm currently in the process of creating a SWF with multiple Lambda functions as activities. Can you provide an example/documentation on how to achieve this. I have searched a lot for how Lambda functions can be scheduled using deciders but couldn't find any.

Basically, In my case, The input to the Workflow (from the WorkFlowStarter) determines which Lambda function to be executed first. Thereafter, the result of a Lambda function determines which Lambda function to be executed next. An example (in Java) would be helpful.

Help identify real world examples for AWS SDK for Java

The AWS Guide for Java Developers is a work-in-progress, dependent on feedback from the AWS developer community.

You can help. Suggest future content by opening a New issue, entering the details of your request, tagging it "Enhancement" and then clicking Submit new issue.

It is that easy! Thanks in advance!

Best practices for DynamoDB

After reading about the DynamoDBMapper, I figured my DynamoDB implementation was lacking.

I'm really interested to see best practices of implementing a DynamoDB class with Put and Get item functions. Is the DynamoDBMapper the best way to do it or is it better to implement without all the annotations? What are the advantages / disadvantages?

Thank you!

Please do a Fargate Example

Hi,

I would be happy if there is an example with Fargate.
Preferable it should list all the S3-buckets from the container.

I am currently struggling with the AwsCredentialProvider.

Thank you!

java Multhreading

Hello,
I really like your topics and the way you explain. I am a computer science student. I am developing an desktop app that would help farmers get to know the best seed for the area based on the database of experts. I did that well but I also wanted them to be updated on what to do every time there has to be an activity on their crops for instance weed, apply fertilizer etc. I have a table of timing which stores duration for a given crop and what my program does it subtract the starting date as the planting date from the current date and checks from the timing table if the differences in dates matches the duration stored for the crop it fetches the action. I have tried doing a thread but it is not fetching the action. Kindly this is the section of the code.
String selcted_crop = crop();
String selcted_place = activity_Area();

try {
    String s = "Insert into activities(id_Number, f_Name, l_Name, phone_Number, start_Date, crop_ID, place_ID, farm_Size)values(?,?,?,?,?,?,?,?) ";
    pst = conn.prepareStatement(s);
    pst.setString(1, id_Number.getText());
    pst.setString(2, f_Name.getText());
    pst.setString(3, s_Name.getText());
    pst.setString(4, phone_Number.getText());
    pst.setString(5, ((JTextField) jDateChooser2.getDateEditor().getUiComponent()).getText());
    pst.setString(6, selcted_crop);
    pst.setString(7, selcted_place);
    pst.setString(8, farm_Size.getText());
    pst.executeUpdate();
    JOptionPane.showMessageDialog(null, "Record Saved");

    String plc1[] = new String[100];
    String placeve = "";

    Thread t = new Thread() {
        public void run() {
            for (;;) {
                Calendar c = new GregorianCalendar();
                int year = c.get(Calendar.YEAR);
                int month = c.get(Calendar.MONTH);
                int day = c.get(Calendar.DAY_OF_MONTH);

                int hour = c.get(Calendar.HOUR);
                int min = c.get((Calendar.MINUTE));
                int sec = c.get(Calendar.SECOND);

                CurrentDate = year + "-0" + month + day;
                CurrentHour = "0" + hour + min + sec;

            }
        }
    };
    t.start();

    for (int i = 0; i <= 3; i++) {
        try {
            String stl = "Select *from vendors where place_ID = '" + place_ComboBox.getSelectedItem().toString() + "'";
            pst = conn.prepareStatement(stl);
            rst = pst.executeQuery();
            while (rst.next()) {
                plc1[i] = rst.getString("vendor_Name");
                JOptionPane.showMessageDialog(null, plc1[i]);

            }
        } catch (Exception e) {

        }
    }

    String name = f_Name.getText();
    try {
        String g = "select *from activity where s_name=?";
        pst = conn.prepareStatement(g);
        pst.setString(1, name);
        rst = pst.executeQuery();
        if (rst.next()) {
            name = rst.getString("s_Name");
        }
    } catch (Exception e) {

    }
    String crop1 = crop_ComboBox.getSelectedItem().toString();
    String crop_ID = "";
    try {
        String l = "select *from crops where crop_Name=?";
        pst = conn.prepareStatement(l);
        pst.setString(1, crop1);
        rst = pst.executeQuery();
        if (rst.next()) {
            crop_ID = rst.getString("crop_ID");
        }
    } catch (Exception e) {
        JOptionPane.showMessageDialog(null, e);
    }
    String plc = place_ComboBox.getSelectedItem().toString();
    String place_ID = "";
    try {
        String re = "select *from places where place_Name=?";
        pst = conn.prepareStatement(re);
        pst.setString(1, plc);
        rst = pst.executeQuery();
        if (rst.next()) {
            place_ID = rst.getString("place_ID");
        }
    } catch (Exception e) {
        JOptionPane.showMessageDialog(null, e);
    }

    String pie = "";
    String pie1 = "";
    try {
        String b = "select * from seeds where crop_ID=? and place_ID=?";
        pst = conn.prepareStatement(b);
        pst.setString(1, crop_ID);
        pst.setString(2, place_ID);
        rst = pst.executeQuery();

        if (rst.next()) {
            pie = rst.getString("seed_Name");
            pie1 = rst.getString("seed_ID");
            JOptionPane.showMessageDialog(null, "Hujambo " + name + ", You are being informed that the best seed for you is " + pie + ". KIndly buy the seeds from a trusted vendor");
        }
    } catch (Exception e) {
        JOptionPane.showMessageDialog(null, e);
    }

    int uniqueid = 0;
    String action = "";
    String cp[] = new String[1000];
    int diffDays[] = new int[100];
    String pNumber = phone_Number.getText();
    for (int i = 0; i < uniqueid; i++) {
        try {
            String str = "Select *from activities where phone_Number = '" + pNumber + "'";
            pst = conn.prepareStatement(str);
            rst = pst.executeQuery();
            while (rst.next()) {
                String dp = rst.getString("start_Date");
                String kp = rst.getString("cropId");
            }

        } catch (Exception e) {

        }
        int dur = 0;

        try {
            String ke = "select from actions where seed_ID='" + pie1 + "'";
            pst = conn.prepareStatement(ke);
            rst = pst.executeQuery();
            while (rst.next()) {
                action = rst.getString("action");
                if (rst.next()) {
                    dur = rst.getInt("Duration");
                    action = rst.getString("action");
                    if (diffDays[i] == dur) {
                        JOptionPane.showMessageDialog(null, "Kindly it has gone'" + dur + "' you are being informed to '" + action + "'");
                    }

                }

            }
        } catch (Exception e) {

        }
    }
} catch (Exception e) {
    JOptionPane.showMessageDialog(null, e);

}

Example swf initialization code errors

On the swf-basics page, we see:

AmazonSimpleWorkflowClient swf = AmazonSimpleWorkflowClientBuilder.defaultClient();

This won't compile, since AmazonSimpleWorkflowClientBuilder.defaultClient() is declared to return an instance of AmazonSimpleWorkflow, which isn't compile-time guaranteed to be an AmazonSimpleWorkflowClient instance.

java.lang.UnsupportedOperationException when using AmazonS3EncryptionClient with TransferUtility [Urgent]

Hi,

Has anyone tried using AmazonS3EncryptionClient with TransferUtility?

Irrespective of the chosen CryptoConfiguration, when ObjectMetadata.addUserMetadata is internally called during the building of the putobject request, an exception is raised, which is apparently the result of ObjectMetadata.usermetadata being an UnmodifiableMap, which makes it impossible to add the required custom meta data:

When using AmazonS3EncryptionClient.putObject directly (not using TransferUtility), such an error does not happen.

This is urgent.

Here is the exception:

java.lang.UnsupportedOperationException
at java.util.Collections$UnmodifiableMap.put(Collections.java:1280)
at com.amazonaws.services.s3.model.ObjectMetadata.addUserMetadata(ObjectMetadata.java:196)
at com.amazonaws.services.s3.internal.crypto.EncryptionUtils.encryptRequestUsingInstruction(EncryptionUtils.java:362)
at com.amazonaws.services.s3.internal.crypto.S3CryptoModuleEO.putObjectUsingInstructionFile(S3CryptoModuleEO.java:354)
at com.amazonaws.services.s3.internal.crypto.S3CryptoModuleEO.putObjectSecurely(S3CryptoModuleEO.java:87)
at com.amazonaws.services.s3.internal.crypto.CryptoModuleDispatcher.putObjectSecurely(CryptoModuleDispatcher.java:85)
at com.amazonaws.services.s3.AmazonS3EncryptionClient.putObject(AmazonS3EncryptionClient.java:412)
at com.amazonaws.mobileconnectors.s3.transferutility.UploadTask.uploadSinglePartAndWaitForCompletion(UploadTask.java:203)
at com.amazonaws.mobileconnectors.s3.transferutility.UploadTask.call(UploadTask.java:85)
at com.amazonaws.mobileconnectors.s3.transferutility.UploadTask.call(UploadTask.java:44)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)

Cannot import entire SDK

From this page: https://github.com/awsdocs/aws-java-developer-guide/blob/master/doc_source/setup-project-maven.rst

I have tried importing the entire SDK with

<dependencies>
    <dependency>
        <groupId>com.amazonaws</groupId>
        <artifactId>aws-java-sdk</artifactId>
    </dependency>
</dependencies>

But get an error that I must specify a version.

If I specify a version, this dependency works, but that defeats the purpose of the BOM.

Is it possible to import the whole SDK using the BOM?

For reference, BOM:

<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>com.amazonaws</groupId>
      <artifactId>aws-java-sdk-bom</artifactId>
      <version>1.11.22</version>
      <type>pom</type>
      <scope>import</scope>
    </dependency>
  </dependencies>
</dependencyManagement>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.