AWS SDK For Java

2y ago
32 Views
2 Downloads
1.64 MB
197 Pages
Last View : 1m ago
Last Download : 3m ago
Upload by : Emanuel Batten
Transcription

AWS SDK for JavaDeveloper GuideAWS SDK for Java: Developer GuideCopyright Amazon Web Services, Inc. and/or its affiliates. All rights reserved.

AWS SDK for Java Developer GuideAmazon's trademarks and trade dress may not be used in connection with any product or service that is notAmazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages ordiscredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who mayor may not be affiliated with, connected to, or sponsored by Amazon.

AWS SDK for Java Developer GuideTable of Contents. viAWS SDK for Java 1.x . 1New version released: AWS SDK for Java 2.x . 1Additional Documentation and Resources . 1Eclipse IDE Support . 1Developing AWS Applications for Android . 2Viewing the SDK’s Revision History . 2Building Java Reference Documentation for Earlier SDK versions . 2Getting Started . 3Sign Up for AWS and Create an IAM User . 3Set up the AWS SDK for Java . 4Prerequisites . 4Including the SDK in your project . 4Downloading and extracting the SDK . 4Installing previous versions of the SDK . 5Installing a Java Development Environment . 5Set up AWS Credentials and Region for Development . 6Setting AWS Credentials . 6Refreshing IMDS credentials . 7Setting the AWS Region . 7Getting Temporary Credentials with AWS STS . 8Using the SDK with Apache Maven . 10Create a new Maven package . 10Configure the SDK as a Maven dependency . 10Build your project . 12Build the SDK with Maven . 12Using the SDK with Gradle . 12Project setup for Gradle 4.6 or higher . 12Project setup for Gradle versions earlier than 4.6 . 13Enabling AWS SDK Metrics for Enterprise Support . 14Enable SDK Metrics for the AWS SDK for Java . 15Update a CloudWatch Agent . 17Disable SDK Metrics . 17Definitions for SDK Metrics . 18Using the AWS SDK for Java . 21Best Practices for AWS Development with the AWS SDK for Java . 21Amazon S3 . 21Creating Service Clients . 22Obtaining a Client Builder . 22Creating Async Clients . 23Using DefaultClient . 23Client Lifecycle . 24Working with AWS Credentials . 24Using the Default Credential Provider Chain . 24Specifying a Credential Provider or Provider Chain . 26Explicitly Specifying Credentials . 27More Info . 27AWS Region Selection . 27Checking for Service Availability in an AWS Region . 28Choosing a Region . 28Choosing a Specific Endpoint . 28Automatically Determine the AWS Region from the Environment . 29Exception Handling . 30Why Unchecked Exceptions? . 30iii

AWS SDK for Java Developer GuideAmazonServiceException (and Subclasses) . 30AmazonClientException . 30Asynchronous Programming . 31Java Futures . 31Asynchronous Callbacks . 32Best Practices . 33Logging AWS SDK for Java Calls . 33Download the Log4J JAR . 34Setting the Classpath . 34Service-Specific Errors and Warnings . 34Request/Response Summary Logging . 35Verbose Wire Logging . 35Latency Metrics Logging . 36Client Configuration . 36Proxy Configuration . 36HTTP Transport Configuration . 36TCP Socket Buffer Size Hints . 37Access Control Policies . 38Amazon S3 Example . 38Amazon SQS Example . 38Amazon SNS Example . 39Setting the JVM TTL for DNS Name Lookups . 39How to Set the JVM TTL . 39Enabling Metrics for the AWS SDK for Java . 40How to Enable AWS SDK for Java Metric Generation . 40Available Metric Types . 41More Information . 43Code Examples . 44AWS SDK for Java 2.x . 44Amazon CloudWatch Examples . 44Getting Metrics from CloudWatch . 44Publishing Custom Metric Data . 45Working with CloudWatch Alarms . 46Using Alarm Actions in CloudWatch . 48Sending Events to CloudWatch . 49Amazon DynamoDB Examples . 51Working with Tables in DynamoDB . 52Working with Items in DynamoDB . 56Amazon EC2 Examples . 61Tutorial: Starting an EC2 Instance . 61Using IAM Roles to Grant Access to AWS Resources on Amazon EC2 . 65Tutorial: Amazon EC2 Spot Instances . 69Tutorial: Advanced Amazon EC2 Spot Request Management . 76Managing Amazon EC2 Instances . 87Using Elastic IP Addresses in Amazon EC2 . 91Use regions and availability zones . 93Working with Amazon EC2 Key Pairs . 95Working with Security Groups in Amazon EC2 . 97AWS Identity and Access Management (IAM) Examples . 99Managing IAM Access Keys . 100Managing IAM Users . 103Using IAM Account Aliases . 105Working with IAM Policies . 107Working with IAM Server Certificates . 110Amazon Lambda Examples . 112Service Operations . 113Amazon Pinpoint Examples . 115iv

AWS SDK for Java Developer GuideCreating and Deleting Apps in Amazon Pinpoint . 116Creating Endpoints in Amazon Pinpoint . 117Creating Segments in Amazon Pinpoint . 118Creating Campaigns in Amazon Pinpoint . 119Updating Channels in Amazon Pinpoint . 121Amazon S3 Examples . 122Creating, Listing, and Deleting Amazon S3 Buckets . 122Performing Operations on Amazon S3 Objects . 125Managing Amazon S3 Access Permissions for Buckets and Objects . 129Managing Access to Amazon S3 Buckets Using Bucket Policies . 132Using TransferManager for Amazon S3 Operations . 134Configuring an Amazon S3 Bucket as a Website . 143Use Amazon S3 client-side encryption . 145Amazon SQS Examples . 149Working with Amazon SQS Message Queues . 149Sending, Receiving, and Deleting Amazon SQS Messages . 151Enabling Long Polling for Amazon SQS Message Queues . 153Setting Visibility Timeout in Amazon SQS . 155Using Dead Letter Queues in Amazon SQS . 156Amazon SWF Examples . 158Amazon SWF Basics . 158Building a Simple Amazon SWF Application . 159Lambda Tasks . 172Shutting Down Activity and Workflow Workers Gracefully . 175Registering Domains . 177Listing Domains . 178Code Samples included with the SDK . 178How to Get the Samples . 178Building and Running the Samples Using the Command Line . 178Building and Running the Samples Using the Eclipse IDE . 179Security . 181Compliance Validation . 181Data Protection . 182Enforcing TLS 1.2 . 182TLS support in Java . 183How to check the TLS version . 183How to set the TLS version . 183Identity and Access Management . 183Infrastructure Security . 184Resilience . 184S3 Encryption Client Migration . 184Prerequisites . 184Migration Overview . 185Update Existing Clients to Read New Formats .

The AWS SDK for Java provides a Java API for Amazon Web Services. Using the SDK, you can easily build Java applications that work with Amazon S3, Amazon EC2, Amazon SimpleDB, and more. We regularly add support for new s

Related Documents:

AWS SDK for JavaScript AWS SDK for JavaScript code examples AWS SDK for .NET AWS SDK for .NET code examples AWS SDK for PHP AWS SDK for PHP code examples AWS SDK for Python (Boto3) AWS SDK for Python (Boto3) code examples AWS SDK for Ruby AWS SDK for Ruby co

AWS SDK for JavaScript Developer Guide for SDK Version 3 Maintenance and support for SDK major versions What is the AWS SDK for JavaScript? Welcome to the AWS SDK for JavaScript Developer Guide. This guide provides general information about setting up and configuring the AWS SDK for JavaScript. It also walks you through examples and tutorial

The AWS SDK for Ruby Developer Guide provides information about how to install, set up, and use the AWS SDK for Ruby to create Ruby applications that use AWS services. Getting Started with the AWS SDK for Ruby (p. 3) Additional Documentation and Resources For more resources for AWS SDK for Ruby developers, see the following:

4 AWS Training & Services AWS Essentials Training AWS Cloud Practitioner Essentials (CP-ESS) AWS Technical Essentials (AWSE) AWS Business Essentials (AWSBE) AWS Security Essentials (SEC-ESS) AWS System Architecture Training Architecting on AWS (AWSA) Advanced Architecting on AWS (AWSAA) Architecting on AWS - Accelerator (ARCH-AX) AWS Development Training

java.io Input and output java.lang Language support java.math Arbitrary-precision numbers java.net Networking java.nio "New" (memory-mapped) I/O java.rmi Remote method invocations java.security Security support java.sql Database support java.text Internationalized formatting of text and numbers java.time Dates, time, duration, time zones, etc.

Java Version Java FAQs 2. Java Version 2.1 Used Java Version This is how you find your Java version: Start the Control Panel Java General About. 2.2 Checking Java Version Check Java version on https://www.java.com/de/download/installed.jsp. 2.3 Switching on Java Console Start Control Panel Java Advanced. The following window appears:

ANDROID SDK INSTALLATION . Receive the SDK . After receiving information on how to retrieve the ZIP File containing the SDK, use the following steps on to install the SDK properly. Install Static Library & Header . To install the Barometric SDK, add the files included in the zip file to the listed locations below. .ZIP FILES FILE LOCATION

find on software development processes, which led me to Scrum and to Ken Schwaber’s early writings on it. In the years since my first Scrum proj ect, I have used Scrum on commercial products, software for internal use, consulting projects, projects with ISO 9001 requirements, and others. Each of these projects was unique, but what they had in common was urgency and criticality. Sc rum excels .