From 1880dbc700a1caedd33023884a1da019e6f77127 Mon Sep 17 00:00:00 2001 From: Soo Sung Date: Wed, 6 Dec 2017 21:22:13 -0800 Subject: [PATCH 001/139] fixing duplicate reference names and incorrect role names --- doc_source/examples-crypto-kms.rst | 10 +++++----- doc_source/examples-crypto-masterkey.rst | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc_source/examples-crypto-kms.rst b/doc_source/examples-crypto-kms.rst index 571819e..40d333b 100644 --- a/doc_source/examples-crypto-kms.rst +++ b/doc_source/examples-crypto-kms.rst @@ -45,7 +45,7 @@ Import the following classes for these examples. :lines: 16-31 :language: java -.. _encryption-only: +.. _encryption-only-kms: Encryption-Only Mode ==================== @@ -84,7 +84,7 @@ You can retrieve the object using the same client. This example calls the See the :sdk-examples-java-s3:`complete example ` on GitHub. -.. _authenticated-encryption: +.. _authenticated-encryption-kms: Authenticated Encryption Mode ============================= @@ -101,7 +101,7 @@ blog post. file in the classpath of your application. To enable this mode, specify the :classname:`AuthenticatedEncryption` value in the -:method:`withCryptoConfiguration` method. +:methodName:`withCryptoConfiguration` method. **Code** @@ -124,13 +124,13 @@ objects encrypted with :classname:`EncryptionOnly` mode. The following example s See the :sdk-examples-java-s3:`complete example ` on GitHub. -.. _strict-authenticated-encryption: +.. _strict-authenticated-encryption-kms: Strict Authenticated Encryption =============================== To enable this mode, specify the :classname:`StrictAuthenticatedEncryption` value in the -:method:`withCryptoConfiguration` method. +:methodName:`withCryptoConfiguration` method. .. note:: To use client-side authenticated encryption, you must include the latest `Bouncy Castle jar `_ file diff --git a/doc_source/examples-crypto-masterkey.rst b/doc_source/examples-crypto-masterkey.rst index 0b96960..c300776 100644 --- a/doc_source/examples-crypto-masterkey.rst +++ b/doc_source/examples-crypto-masterkey.rst @@ -110,7 +110,7 @@ blog post. in the classpath of your application. To enable this mode, specify the :classname:`AuthenticatedEncryption` value in the -:method:`withCryptoConfiguration` method. +:methodName:`withCryptoConfiguration` method. **Code** @@ -138,7 +138,7 @@ Strict Authenticated Encryption =============================== To enable this mode, specify the :classname:`StrictAuthenticatedEncryption` value in the -:method:`withCryptoConfiguration` method. +:methodName:`withCryptoConfiguration` method. .. note:: To use client-side authenticated encryption, you must include the latest `Bouncy Castle jar `_ file From b04dbf2b51031750fa898299fc1fba9cf81a030d Mon Sep 17 00:00:00 2001 From: Soo Sung Date: Mon, 11 Dec 2017 16:38:43 -0800 Subject: [PATCH 002/139] adjusting sample code lines --- doc_source/examples-dynamodb-tables.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc_source/examples-dynamodb-tables.rst b/doc_source/examples-dynamodb-tables.rst index b79e987..0894259 100644 --- a/doc_source/examples-dynamodb-tables.rst +++ b/doc_source/examples-dynamodb-tables.rst @@ -116,13 +116,13 @@ You can list the tables in a particular region by calling the :aws-java-class:`D **Imports** .. literalinclude:: example_code/dynamodb/src/main/java/aws/example/dynamodb/ListTables.java - :lines: 15-18 + :lines: 15-19 :language: java **Code** .. literalinclude:: example_code/dynamodb/src/main/java/aws/example/dynamodb/ListTables.java - :lines: 33-63 + :lines: 33-67 :dedent: 8 :language: java From c1a3663e18e2e3b7a42bf0514638dbd961363bf8 Mon Sep 17 00:00:00 2001 From: Soo Sung Date: Fri, 29 Dec 2017 17:41:13 -0800 Subject: [PATCH 003/139] fixing broken links --- doc_source/examples-cloudwatch-create-alarms.rst | 6 +++--- doc_source/examples-cloudwatch-get-metrics.rst | 2 +- doc_source/examples-cloudwatch-publish-custom-metrics.rst | 2 +- doc_source/examples-cloudwatch-send-events.rst | 6 +++--- doc_source/examples-cloudwatch-use-alarm-actions.rst | 6 +++--- doc_source/examples-cloudwatch.rst | 3 +-- doc_source/examples-dynamodb-items.rst | 4 ++-- doc_source/examples-dynamodb-tables.rst | 4 ++-- doc_source/examples-ec2-key-pairs.rst | 4 ++-- 9 files changed, 18 insertions(+), 19 deletions(-) diff --git a/doc_source/examples-cloudwatch-create-alarms.rst b/doc_source/examples-cloudwatch-create-alarms.rst index 3b8dfac..ec85007 100644 --- a/doc_source/examples-cloudwatch-create-alarms.rst +++ b/doc_source/examples-cloudwatch-create-alarms.rst @@ -96,6 +96,6 @@ More Information ================ * :cw-ug:`Creating Amazon CloudWatch Alarms ` in the |cw-ug| -* :cw-api:`PutMetricAlarm` in the |cw-api| -* :cw-api:`DescribeAlarms` in the |cw-api| -* :cw-api:`DeleteAlarms` in the |cw-api| +* :cw-api:`PutMetricAlarm ` in the |cw-api| +* :cw-api:`DescribeAlarms ` in the |cw-api| +* :cw-api:`DeleteAlarms ` in the |cw-api| diff --git a/doc_source/examples-cloudwatch-get-metrics.rst b/doc_source/examples-cloudwatch-get-metrics.rst index e5caac2..8c20fe9 100644 --- a/doc_source/examples-cloudwatch-get-metrics.rst +++ b/doc_source/examples-cloudwatch-get-metrics.rst @@ -50,4 +50,4 @@ the original request object with the return value of the :classname:`ListMetrics More Information ================ -* :cw-api:`ListMetrics` in the |cw-api|. +* :cw-api:`ListMetrics ` in the |cw-api|. diff --git a/doc_source/examples-cloudwatch-publish-custom-metrics.rst b/doc_source/examples-cloudwatch-publish-custom-metrics.rst index 68a638a..05d46f3 100644 --- a/doc_source/examples-cloudwatch-publish-custom-metrics.rst +++ b/doc_source/examples-cloudwatch-publish-custom-metrics.rst @@ -52,4 +52,4 @@ More Information * :cw-ug:`Using Amazon CloudWatch Metrics ` in the |cw-ug|. * :cw-ug:`AWS Namespaces ` in the |cw-ug|. -* :cw-api:`PutMetricData` in the |cw-api|. +* :cw-api:`PutMetricData ` in the |cw-api|. diff --git a/doc_source/examples-cloudwatch-send-events.rst b/doc_source/examples-cloudwatch-send-events.rst index 3e2d9c2..f85ffd1 100644 --- a/doc_source/examples-cloudwatch-send-events.rst +++ b/doc_source/examples-cloudwatch-send-events.rst @@ -99,6 +99,6 @@ More Information * :cwe-ug:`Schedule Expressions for Rules ` in the |cwe-ug| * :cwe-ug:`Event Types for CloudWatch Events ` in the |cwe-ug| * :cwe-ug:`Events and Event Patterns ` in the |cwe-ug| -* :cwe-api:`PutEvents` in the |cwe-api| -* :cwe-api:`PutTargets` in the |cwe-api| -* :cwe-api:`PutRule` in the |cwe-api| +* :cwe-api:`PutEvents ` in the |cwe-api| +* :cwe-api:`PutTargets ` in the |cwe-api| +* :cwe-api:`PutRule ` in the |cwe-api| diff --git a/doc_source/examples-cloudwatch-use-alarm-actions.rst b/doc_source/examples-cloudwatch-use-alarm-actions.rst index 7c28cab..46239d5 100644 --- a/doc_source/examples-cloudwatch-use-alarm-actions.rst +++ b/doc_source/examples-cloudwatch-use-alarm-actions.rst @@ -73,6 +73,6 @@ More Information * :cw-ug:`Create Alarms to Stop, Terminate, Reboot, or Recover an Instance ` in the |cw-ug| -* :cw-api:`PutMetricAlarm` in the |cw-api| -* :cw-api:`EnableAlarmActions` in the |cw-api| -* :cw-api:`DisableAlarmActions` in the |cw-api| +* :cw-api:`PutMetricAlarm ` in the |cw-api| +* :cw-api:`EnableAlarmActions ` in the |cw-api| +* :cw-api:`DisableAlarmActions ` in the |cw-api| diff --git a/doc_source/examples-cloudwatch.rst b/doc_source/examples-cloudwatch.rst index 95b0596..2a8ab9c 100644 --- a/doc_source/examples-cloudwatch.rst +++ b/doc_source/examples-cloudwatch.rst @@ -14,7 +14,7 @@ .. meta:: :description: Programming Amazon Cloudwatch using the AWS SDK for Java - :keywords: AWS SDK for Java code examples, IAM + :keywords: AWS SDK for Java code examples, Cloudwatch This section provides examples of programming |cw|_ using the |sdk-java|_. @@ -33,4 +33,3 @@ For more information about |cw|, see the |cw-ug|_. examples-cloudwatch-create-alarms examples-cloudwatch-use-alarm-actions examples-cloudwatch-send-events - diff --git a/doc_source/examples-dynamodb-items.rst b/doc_source/examples-dynamodb-items.rst index 301f5e1..a6d5440 100644 --- a/doc_source/examples-dynamodb-items.rst +++ b/doc_source/examples-dynamodb-items.rst @@ -28,8 +28,8 @@ Retrieve (Get) an Item from a Table Call the |ddbclient|'s :methodname:`getItem` method and pass it a :aws-java-class:`GetItemRequest ` object with the table -name and primary key value of the item you want. It returns a `GetItemResult -` object. +name and primary key value of the item you want. It returns a +:aws-java-class:`GetItemResult ` object. You can use the returned :classname:`GetItemResult` object's :methodname:`getItem()` method to retrieve a :javase-ref:`Map ` of key (String) and value diff --git a/doc_source/examples-dynamodb-tables.rst b/doc_source/examples-dynamodb-tables.rst index 0894259..888669e 100644 --- a/doc_source/examples-dynamodb-tables.rst +++ b/doc_source/examples-dynamodb-tables.rst @@ -90,7 +90,7 @@ Create a Table with a Composite Primary Key Add another :aws-java-class:`AttributeDefinition ` and :aws-java-class:`KeySchemaElement ` to -:aws-java-class:`CreateTableRequest `. +:aws-java-class:`CreateTableRequest `. **Code** @@ -127,7 +127,7 @@ You can list the tables in a particular region by calling the :aws-java-class:`D :language: java By default, up to 100 tables are returned per call |mdash| use -:methodname:`getLastEvaluatedTableName` on the returned :aws-java-class:`ListTablesResult <>` object +:methodname:`getLastEvaluatedTableName` on the returned :aws-java-class:`ListTablesResult ` object to get the last table that was evaluated. You can use this value to start the listing after the last returned value of the previous listing. diff --git a/doc_source/examples-ec2-key-pairs.rst b/doc_source/examples-ec2-key-pairs.rst index 80681d9..b94a2c9 100644 --- a/doc_source/examples-ec2-key-pairs.rst +++ b/doc_source/examples-ec2-key-pairs.rst @@ -45,8 +45,8 @@ Describing Key Pairs ==================== To list your key pairs or to get information about them, call the |ec2client|'s -:methodname:`describeKeyPairs` method. It returns a :aws-java-class:`DescribeKeyPairsRequest -` that you can use to access the list of key pairs by +:methodname:`describeKeyPairs` method. It returns a :aws-java-class:`DescribeKeyPairsResult +` that you can use to access the list of key pairs by calling its :methodname:`getKeyPairs` method, which returns a list of :aws-java-class:`KeyPairInfo ` objects. From 07813760bf0cc4112be7bf82b46388bab6f3b731 Mon Sep 17 00:00:00 2001 From: Soo Sung Date: Tue, 2 Jan 2018 16:13:32 -0800 Subject: [PATCH 004/139] removing invalid code in java spot instance tutorial --- doc_source/tutorial-spot-instances-java.rst | 3 --- 1 file changed, 3 deletions(-) diff --git a/doc_source/tutorial-spot-instances-java.rst b/doc_source/tutorial-spot-instances-java.rst index 9962d51..90d91fc 100644 --- a/doc_source/tutorial-spot-instances-java.rst +++ b/doc_source/tutorial-spot-instances-java.rst @@ -114,7 +114,6 @@ address indicates the subnet for the specified IP address. We also configure the .. code-block:: java - // Create the AmazonEC2 client so we can call various APIs. AmazonEC2 ec2 = AmazonEC2ClientBuilder.defaultClient(); @@ -531,5 +530,3 @@ Next Steps ========== Proceed with :doc:`tutorial-spot-adv-java`. - - From 825c6b5c7fb451e2facc0e27344457126b30ccf1 Mon Sep 17 00:00:00 2001 From: Soo Sung Date: Wed, 3 Jan 2018 10:39:30 -0800 Subject: [PATCH 005/139] updating copyright to 2018 --- doc_source/_includes.txt | 2 +- doc_source/basics-async.rst | 2 +- doc_source/basics.rst | 2 +- doc_source/best-practices.rst | 2 +- doc_source/conf.py | 2 +- doc_source/create-key-pair.rst | 2 +- doc_source/create-security-group.rst | 2 +- doc_source/creating-clients.rst | 2 +- doc_source/credentials.rst | 2 +- doc_source/document-history.rst | 2 +- doc_source/examples-cloudwatch-create-alarms.rst | 2 +- doc_source/examples-cloudwatch-get-metrics.rst | 2 +- doc_source/examples-cloudwatch-publish-custom-metrics.rst | 2 +- doc_source/examples-cloudwatch-send-events.rst | 2 +- doc_source/examples-cloudwatch-use-alarm-actions.rst | 2 +- doc_source/examples-cloudwatch.rst | 2 +- doc_source/examples-crypto-kms.rst | 2 +- doc_source/examples-crypto-masterkey.rst | 2 +- doc_source/examples-crypto.rst | 2 +- doc_source/examples-dynamodb-items.rst | 2 +- doc_source/examples-dynamodb-query-scan.rst | 2 +- doc_source/examples-dynamodb-tables.rst | 2 +- doc_source/examples-dynamodb.rst | 2 +- doc_source/examples-ec2-elastic-ip.rst | 2 +- doc_source/examples-ec2-instances.rst | 2 +- doc_source/examples-ec2-key-pairs.rst | 2 +- doc_source/examples-ec2-regions-zones.rst | 2 +- doc_source/examples-ec2-security-groups.rst | 2 +- doc_source/examples-iam-access-keys.rst | 2 +- doc_source/examples-iam-account-aliases.rst | 2 +- doc_source/examples-iam-policies.rst | 2 +- doc_source/examples-iam-server-certificates.rst | 2 +- doc_source/examples-iam-users.rst | 2 +- doc_source/examples-iam.rst | 2 +- doc_source/examples-s3-access-permissions.rst | 2 +- doc_source/examples-s3-bucket-policies.rst | 2 +- doc_source/examples-s3-buckets.rst | 2 +- doc_source/examples-s3-objects.rst | 2 +- doc_source/examples-s3-transfermanager.rst | 2 +- doc_source/examples-s3-website-configuration.rst | 2 +- doc_source/examples-s3.rst | 2 +- doc_source/examples-sqs-dead-letter-queues.rst | 2 +- doc_source/examples-sqs-long-polling.rst | 2 +- doc_source/examples-sqs-message-queues.rst | 2 +- doc_source/examples-sqs-messages.rst | 2 +- doc_source/examples-sqs-visibility-timeout.rst | 2 +- doc_source/examples-sqs.rst | 2 +- doc_source/generating-sdk-metrics.rst | 2 +- doc_source/getting-started.rst | 2 +- doc_source/how-to-ec2.rst | 2 +- doc_source/includes/complete-examples-note.txt | 2 +- doc_source/includes/examples-note.txt | 2 +- .../includes/transfermanager-complete-get-status-note.txt | 2 +- doc_source/includes/transfermanager-multifileupload-notes.txt | 2 +- doc_source/index.rst | 2 +- doc_source/java-dg-access-control.rst | 2 +- doc_source/java-dg-exceptions.rst | 2 +- doc_source/java-dg-jvm-ttl.rst | 2 +- doc_source/java-dg-logging.rst | 2 +- doc_source/java-dg-region-selection.rst | 2 +- doc_source/java-dg-roles.rst | 2 +- doc_source/java-dg-samples.rst | 2 +- doc_source/java-dg-tomcat-session-manager.rst | 2 +- doc_source/prog-services-ec2.rst | 2 +- doc_source/prog-services-sts.rst | 2 +- doc_source/prog-services-swf-list-domains.rst | 2 +- doc_source/prog-services-swf-register-domain.rst | 2 +- doc_source/prog-services-swf.rst | 2 +- doc_source/prog-services.rst | 2 +- doc_source/run-instance.rst | 2 +- doc_source/section-client-configuration.rst | 2 +- doc_source/setup-credentials.rst | 2 +- doc_source/setup-install.rst | 2 +- doc_source/setup-project-gradle.rst | 2 +- doc_source/setup-project-maven.rst | 2 +- doc_source/signup-create-iam-user.rst | 2 +- doc_source/snippets/CreateSwfDomain-list_swf_domains.java | 2 +- doc_source/snippets/CreateSwfDomain-register_swf_domain.java | 2 +- doc_source/snippets/CreateSwfDomain/CreateSwfDomain.java | 2 +- doc_source/snippets/CreateSwfDomain/build.xml | 2 +- doc_source/snippets/GetS3ObjectApp/GetS3Object.java | 2 +- doc_source/snippets/GetS3ObjectApp/build.xml | 2 +- doc_source/snippets/ec2/cancel-terminate-spot-request.java | 2 +- doc_source/snippets/ec2/tag-spot-instances.java | 2 +- doc_source/snippets/ec2/tag-spot-requests.java | 2 +- doc_source/snippets/helloswf_lambda/SwfHelloLambdaFunction.java | 2 +- .../src/main/java/example/swf/hellolambda/HelloTypes.java | 2 +- .../src/main/java/example/swf/hellolambda/WorkflowStarter.java | 2 +- .../src/main/java/example/swf/hellolambda/WorkflowWorker.java | 2 +- .../src/main/java/example/lambda/InvokeLambdaFunction.java | 2 +- .../src/main/java/example/lambda/InvokeLambdaFunctionAsync.java | 2 +- .../main/java/example/lambda/InvokeLambdaFunctionCallback.java | 2 +- doc_source/snippets/retrieve-credentials-properties-file-2.java | 2 +- doc_source/snippets/retrieve-credentials-properties-file.java | 2 +- doc_source/snippets/spot-request-ebs.java | 2 +- doc_source/snippets/spot-request-set-az-group.java | 2 +- doc_source/snippets/spot-request-set-az.java | 2 +- doc_source/snippets/spot-request-set-launch-group.java | 2 +- doc_source/snippets/spot-request-set-placement-group.java | 2 +- doc_source/snippets/spot-request-set-type.java | 2 +- doc_source/snippets/spot-request-set-validity-period.java | 2 +- doc_source/snippets/spot-request-tagging.java | 2 +- doc_source/snippets/sts_basic_session_creds.java | 2 +- .../snippets/tutorial-spot-adv-java-limit-request-duration.java | 2 +- doc_source/swf-basics.rst | 2 +- doc_source/swf-graceful-shutdown.rst | 2 +- doc_source/swf-hello.rst | 2 +- doc_source/swf-lambda-task.rst | 2 +- doc_source/tutorial-spot-adv-java.rst | 2 +- doc_source/tutorial-spot-instances-java.rst | 2 +- doc_source/welcome.rst | 2 +- 111 files changed, 111 insertions(+), 111 deletions(-) diff --git a/doc_source/_includes.txt b/doc_source/_includes.txt index 9f44984..5559f43 100644 --- a/doc_source/_includes.txt +++ b/doc_source/_includes.txt @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/basics-async.rst b/doc_source/basics-async.rst index 3e60ebc..3c29ca5 100644 --- a/doc_source/basics-async.rst +++ b/doc_source/basics-async.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/basics.rst b/doc_source/basics.rst index 4808aed..83cf334 100644 --- a/doc_source/basics.rst +++ b/doc_source/basics.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/best-practices.rst b/doc_source/best-practices.rst index 0d63355..c33d46c 100644 --- a/doc_source/best-practices.rst +++ b/doc_source/best-practices.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/conf.py b/doc_source/conf.py index 3cebc1c..06aa0b9 100644 --- a/doc_source/conf.py +++ b/doc_source/conf.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You may not # use this file except in compliance with the License. A copy of the License diff --git a/doc_source/create-key-pair.rst b/doc_source/create-key-pair.rst index 72d9e05..3e65052 100644 --- a/doc_source/create-key-pair.rst +++ b/doc_source/create-key-pair.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/create-security-group.rst b/doc_source/create-security-group.rst index e9bfe47..38ffae3 100644 --- a/doc_source/create-security-group.rst +++ b/doc_source/create-security-group.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/creating-clients.rst b/doc_source/creating-clients.rst index 8df9392..fe1b14b 100644 --- a/doc_source/creating-clients.rst +++ b/doc_source/creating-clients.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/credentials.rst b/doc_source/credentials.rst index 6ca53c4..291a869 100644 --- a/doc_source/credentials.rst +++ b/doc_source/credentials.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/document-history.rst b/doc_source/document-history.rst index 02377a6..a2977e3 100644 --- a/doc_source/document-history.rst +++ b/doc_source/document-history.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/examples-cloudwatch-create-alarms.rst b/doc_source/examples-cloudwatch-create-alarms.rst index ec85007..5fe9241 100644 --- a/doc_source/examples-cloudwatch-create-alarms.rst +++ b/doc_source/examples-cloudwatch-create-alarms.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/examples-cloudwatch-get-metrics.rst b/doc_source/examples-cloudwatch-get-metrics.rst index 8c20fe9..940681d 100644 --- a/doc_source/examples-cloudwatch-get-metrics.rst +++ b/doc_source/examples-cloudwatch-get-metrics.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/examples-cloudwatch-publish-custom-metrics.rst b/doc_source/examples-cloudwatch-publish-custom-metrics.rst index 05d46f3..cac7e04 100644 --- a/doc_source/examples-cloudwatch-publish-custom-metrics.rst +++ b/doc_source/examples-cloudwatch-publish-custom-metrics.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/examples-cloudwatch-send-events.rst b/doc_source/examples-cloudwatch-send-events.rst index f85ffd1..15d43fa 100644 --- a/doc_source/examples-cloudwatch-send-events.rst +++ b/doc_source/examples-cloudwatch-send-events.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/examples-cloudwatch-use-alarm-actions.rst b/doc_source/examples-cloudwatch-use-alarm-actions.rst index 46239d5..a317a27 100644 --- a/doc_source/examples-cloudwatch-use-alarm-actions.rst +++ b/doc_source/examples-cloudwatch-use-alarm-actions.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/examples-cloudwatch.rst b/doc_source/examples-cloudwatch.rst index 2a8ab9c..db3414f 100644 --- a/doc_source/examples-cloudwatch.rst +++ b/doc_source/examples-cloudwatch.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/examples-crypto-kms.rst b/doc_source/examples-crypto-kms.rst index 40d333b..ab7c5bc 100644 --- a/doc_source/examples-crypto-kms.rst +++ b/doc_source/examples-crypto-kms.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/examples-crypto-masterkey.rst b/doc_source/examples-crypto-masterkey.rst index c300776..7a211e3 100644 --- a/doc_source/examples-crypto-masterkey.rst +++ b/doc_source/examples-crypto-masterkey.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/examples-crypto.rst b/doc_source/examples-crypto.rst index 54fed24..db71298 100644 --- a/doc_source/examples-crypto.rst +++ b/doc_source/examples-crypto.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/examples-dynamodb-items.rst b/doc_source/examples-dynamodb-items.rst index a6d5440..5caefc1 100644 --- a/doc_source/examples-dynamodb-items.rst +++ b/doc_source/examples-dynamodb-items.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/examples-dynamodb-query-scan.rst b/doc_source/examples-dynamodb-query-scan.rst index 4fc4edd..d03b369 100644 --- a/doc_source/examples-dynamodb-query-scan.rst +++ b/doc_source/examples-dynamodb-query-scan.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/examples-dynamodb-tables.rst b/doc_source/examples-dynamodb-tables.rst index 888669e..5a27dbd 100644 --- a/doc_source/examples-dynamodb-tables.rst +++ b/doc_source/examples-dynamodb-tables.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/examples-dynamodb.rst b/doc_source/examples-dynamodb.rst index 0bb24dd..c6d85f3 100644 --- a/doc_source/examples-dynamodb.rst +++ b/doc_source/examples-dynamodb.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/examples-ec2-elastic-ip.rst b/doc_source/examples-ec2-elastic-ip.rst index 74d4693..b13cade 100644 --- a/doc_source/examples-ec2-elastic-ip.rst +++ b/doc_source/examples-ec2-elastic-ip.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/examples-ec2-instances.rst b/doc_source/examples-ec2-instances.rst index 5179312..ac5cfb8 100644 --- a/doc_source/examples-ec2-instances.rst +++ b/doc_source/examples-ec2-instances.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/examples-ec2-key-pairs.rst b/doc_source/examples-ec2-key-pairs.rst index b94a2c9..4461cff 100644 --- a/doc_source/examples-ec2-key-pairs.rst +++ b/doc_source/examples-ec2-key-pairs.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/examples-ec2-regions-zones.rst b/doc_source/examples-ec2-regions-zones.rst index edcbfac..553b0dd 100644 --- a/doc_source/examples-ec2-regions-zones.rst +++ b/doc_source/examples-ec2-regions-zones.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/examples-ec2-security-groups.rst b/doc_source/examples-ec2-security-groups.rst index f39735f..7900120 100644 --- a/doc_source/examples-ec2-security-groups.rst +++ b/doc_source/examples-ec2-security-groups.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/examples-iam-access-keys.rst b/doc_source/examples-iam-access-keys.rst index 2d0a085..fd904e2 100644 --- a/doc_source/examples-iam-access-keys.rst +++ b/doc_source/examples-iam-access-keys.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/examples-iam-account-aliases.rst b/doc_source/examples-iam-account-aliases.rst index f83f041..d94f774 100644 --- a/doc_source/examples-iam-account-aliases.rst +++ b/doc_source/examples-iam-account-aliases.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/examples-iam-policies.rst b/doc_source/examples-iam-policies.rst index 7d0684d..b2ab3b2 100644 --- a/doc_source/examples-iam-policies.rst +++ b/doc_source/examples-iam-policies.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/examples-iam-server-certificates.rst b/doc_source/examples-iam-server-certificates.rst index 4c4cd98..93f3be4 100644 --- a/doc_source/examples-iam-server-certificates.rst +++ b/doc_source/examples-iam-server-certificates.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/examples-iam-users.rst b/doc_source/examples-iam-users.rst index ca38475..e12eee4 100644 --- a/doc_source/examples-iam-users.rst +++ b/doc_source/examples-iam-users.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/examples-iam.rst b/doc_source/examples-iam.rst index a393205..92005a0 100644 --- a/doc_source/examples-iam.rst +++ b/doc_source/examples-iam.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/examples-s3-access-permissions.rst b/doc_source/examples-s3-access-permissions.rst index 64d39e2..892996d 100644 --- a/doc_source/examples-s3-access-permissions.rst +++ b/doc_source/examples-s3-access-permissions.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/examples-s3-bucket-policies.rst b/doc_source/examples-s3-bucket-policies.rst index 25b788c..d6335a1 100644 --- a/doc_source/examples-s3-bucket-policies.rst +++ b/doc_source/examples-s3-bucket-policies.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/examples-s3-buckets.rst b/doc_source/examples-s3-buckets.rst index d2a1c3a..e16efb0 100644 --- a/doc_source/examples-s3-buckets.rst +++ b/doc_source/examples-s3-buckets.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/examples-s3-objects.rst b/doc_source/examples-s3-objects.rst index 4a398ef..56a70fc 100644 --- a/doc_source/examples-s3-objects.rst +++ b/doc_source/examples-s3-objects.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/examples-s3-transfermanager.rst b/doc_source/examples-s3-transfermanager.rst index 850baf3..efaf70b 100644 --- a/doc_source/examples-s3-transfermanager.rst +++ b/doc_source/examples-s3-transfermanager.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/examples-s3-website-configuration.rst b/doc_source/examples-s3-website-configuration.rst index da8e3f7..1a9329f 100644 --- a/doc_source/examples-s3-website-configuration.rst +++ b/doc_source/examples-s3-website-configuration.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/examples-s3.rst b/doc_source/examples-s3.rst index e019f0a..1569a2e 100644 --- a/doc_source/examples-s3.rst +++ b/doc_source/examples-s3.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/examples-sqs-dead-letter-queues.rst b/doc_source/examples-sqs-dead-letter-queues.rst index 56258a5..702dde3 100644 --- a/doc_source/examples-sqs-dead-letter-queues.rst +++ b/doc_source/examples-sqs-dead-letter-queues.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/examples-sqs-long-polling.rst b/doc_source/examples-sqs-long-polling.rst index ef95f91..f3b6dfe 100644 --- a/doc_source/examples-sqs-long-polling.rst +++ b/doc_source/examples-sqs-long-polling.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/examples-sqs-message-queues.rst b/doc_source/examples-sqs-message-queues.rst index 74622ac..f426f18 100644 --- a/doc_source/examples-sqs-message-queues.rst +++ b/doc_source/examples-sqs-message-queues.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/examples-sqs-messages.rst b/doc_source/examples-sqs-messages.rst index 630bef8..67aa64e 100644 --- a/doc_source/examples-sqs-messages.rst +++ b/doc_source/examples-sqs-messages.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/examples-sqs-visibility-timeout.rst b/doc_source/examples-sqs-visibility-timeout.rst index c843f82..12f70ce 100644 --- a/doc_source/examples-sqs-visibility-timeout.rst +++ b/doc_source/examples-sqs-visibility-timeout.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/examples-sqs.rst b/doc_source/examples-sqs.rst index b1a36c5..780e0d3 100644 --- a/doc_source/examples-sqs.rst +++ b/doc_source/examples-sqs.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/generating-sdk-metrics.rst b/doc_source/generating-sdk-metrics.rst index 7291c92..04a62fd 100644 --- a/doc_source/generating-sdk-metrics.rst +++ b/doc_source/generating-sdk-metrics.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/getting-started.rst b/doc_source/getting-started.rst index 0ebc0f9..44b1963 100644 --- a/doc_source/getting-started.rst +++ b/doc_source/getting-started.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/how-to-ec2.rst b/doc_source/how-to-ec2.rst index 003969c..01b4ee4 100644 --- a/doc_source/how-to-ec2.rst +++ b/doc_source/how-to-ec2.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/includes/complete-examples-note.txt b/doc_source/includes/complete-examples-note.txt index 8e285b1..fbc491a 100644 --- a/doc_source/includes/complete-examples-note.txt +++ b/doc_source/includes/complete-examples-note.txt @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/includes/examples-note.txt b/doc_source/includes/examples-note.txt index 0f103f9..3f12239 100644 --- a/doc_source/includes/examples-note.txt +++ b/doc_source/includes/examples-note.txt @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/includes/transfermanager-complete-get-status-note.txt b/doc_source/includes/transfermanager-complete-get-status-note.txt index aaabba0..45986d5 100644 --- a/doc_source/includes/transfermanager-complete-get-status-note.txt +++ b/doc_source/includes/transfermanager-complete-get-status-note.txt @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/includes/transfermanager-multifileupload-notes.txt b/doc_source/includes/transfermanager-multifileupload-notes.txt index 61665a5..0816464 100644 --- a/doc_source/includes/transfermanager-multifileupload-notes.txt +++ b/doc_source/includes/transfermanager-multifileupload-notes.txt @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/index.rst b/doc_source/index.rst index c61b046..8abe472 100644 --- a/doc_source/index.rst +++ b/doc_source/index.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/java-dg-access-control.rst b/doc_source/java-dg-access-control.rst index 7cc94fc..f07454c 100644 --- a/doc_source/java-dg-access-control.rst +++ b/doc_source/java-dg-access-control.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/java-dg-exceptions.rst b/doc_source/java-dg-exceptions.rst index 531c2ad..1e27af6 100644 --- a/doc_source/java-dg-exceptions.rst +++ b/doc_source/java-dg-exceptions.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/java-dg-jvm-ttl.rst b/doc_source/java-dg-jvm-ttl.rst index 66d01bd..273436a 100644 --- a/doc_source/java-dg-jvm-ttl.rst +++ b/doc_source/java-dg-jvm-ttl.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/java-dg-logging.rst b/doc_source/java-dg-logging.rst index 87075d9..c888d9d 100644 --- a/doc_source/java-dg-logging.rst +++ b/doc_source/java-dg-logging.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/java-dg-region-selection.rst b/doc_source/java-dg-region-selection.rst index 6e6d053..de6e25c 100644 --- a/doc_source/java-dg-region-selection.rst +++ b/doc_source/java-dg-region-selection.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/java-dg-roles.rst b/doc_source/java-dg-roles.rst index e2380b3..bf90958 100644 --- a/doc_source/java-dg-roles.rst +++ b/doc_source/java-dg-roles.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/java-dg-samples.rst b/doc_source/java-dg-samples.rst index b061253..73aacf2 100644 --- a/doc_source/java-dg-samples.rst +++ b/doc_source/java-dg-samples.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/java-dg-tomcat-session-manager.rst b/doc_source/java-dg-tomcat-session-manager.rst index 1c73d0d..c46a832 100644 --- a/doc_source/java-dg-tomcat-session-manager.rst +++ b/doc_source/java-dg-tomcat-session-manager.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/prog-services-ec2.rst b/doc_source/prog-services-ec2.rst index d3c9e38..8a2f7a9 100644 --- a/doc_source/prog-services-ec2.rst +++ b/doc_source/prog-services-ec2.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/prog-services-sts.rst b/doc_source/prog-services-sts.rst index 8423751..59e7400 100644 --- a/doc_source/prog-services-sts.rst +++ b/doc_source/prog-services-sts.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/prog-services-swf-list-domains.rst b/doc_source/prog-services-swf-list-domains.rst index a7af948..65f2f4b 100644 --- a/doc_source/prog-services-swf-list-domains.rst +++ b/doc_source/prog-services-swf-list-domains.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/prog-services-swf-register-domain.rst b/doc_source/prog-services-swf-register-domain.rst index 16eacf6..9e7f157 100644 --- a/doc_source/prog-services-swf-register-domain.rst +++ b/doc_source/prog-services-swf-register-domain.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/prog-services-swf.rst b/doc_source/prog-services-swf.rst index ee7c760..04e4dc6 100644 --- a/doc_source/prog-services-swf.rst +++ b/doc_source/prog-services-swf.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/prog-services.rst b/doc_source/prog-services.rst index a448d1f..ac78ca2 100644 --- a/doc_source/prog-services.rst +++ b/doc_source/prog-services.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/run-instance.rst b/doc_source/run-instance.rst index 0482bbf..8fcfafe 100644 --- a/doc_source/run-instance.rst +++ b/doc_source/run-instance.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/section-client-configuration.rst b/doc_source/section-client-configuration.rst index 69a9665..a1184c2 100644 --- a/doc_source/section-client-configuration.rst +++ b/doc_source/section-client-configuration.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/setup-credentials.rst b/doc_source/setup-credentials.rst index 9890cbb..3aef56c 100644 --- a/doc_source/setup-credentials.rst +++ b/doc_source/setup-credentials.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/setup-install.rst b/doc_source/setup-install.rst index 2ceb2f5..bba64f6 100644 --- a/doc_source/setup-install.rst +++ b/doc_source/setup-install.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/setup-project-gradle.rst b/doc_source/setup-project-gradle.rst index 0fd33dc..1adf58c 100644 --- a/doc_source/setup-project-gradle.rst +++ b/doc_source/setup-project-gradle.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/setup-project-maven.rst b/doc_source/setup-project-maven.rst index f62ebc8..afe493e 100644 --- a/doc_source/setup-project-maven.rst +++ b/doc_source/setup-project-maven.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/signup-create-iam-user.rst b/doc_source/signup-create-iam-user.rst index 2bf7b7c..1a1e207 100644 --- a/doc_source/signup-create-iam-user.rst +++ b/doc_source/signup-create-iam-user.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the diff --git a/doc_source/snippets/CreateSwfDomain-list_swf_domains.java b/doc_source/snippets/CreateSwfDomain-list_swf_domains.java index dccb741..cbd7ed7 100644 --- a/doc_source/snippets/CreateSwfDomain-list_swf_domains.java +++ b/doc_source/snippets/CreateSwfDomain-list_swf_domains.java @@ -1,5 +1,5 @@ /* - Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/doc_source/snippets/CreateSwfDomain-register_swf_domain.java b/doc_source/snippets/CreateSwfDomain-register_swf_domain.java index ad1eded..aacc2cf 100644 --- a/doc_source/snippets/CreateSwfDomain-register_swf_domain.java +++ b/doc_source/snippets/CreateSwfDomain-register_swf_domain.java @@ -1,5 +1,5 @@ /* - Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/doc_source/snippets/CreateSwfDomain/CreateSwfDomain.java b/doc_source/snippets/CreateSwfDomain/CreateSwfDomain.java index 7e54088..191e643 100644 --- a/doc_source/snippets/CreateSwfDomain/CreateSwfDomain.java +++ b/doc_source/snippets/CreateSwfDomain/CreateSwfDomain.java @@ -1,5 +1,5 @@ /* - Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/doc_source/snippets/CreateSwfDomain/build.xml b/doc_source/snippets/CreateSwfDomain/build.xml index cb999e5..bef385a 100644 --- a/doc_source/snippets/CreateSwfDomain/build.xml +++ b/doc_source/snippets/CreateSwfDomain/build.xml @@ -1,5 +1,5 @@ ` method for the state of the Spot +` method for the state of the Spot request ID we want to monitor. The request ID created in Step 2 is embedded in the response to our :code:`requestSpotInstances` @@ -400,8 +375,8 @@ Step 5: Cleaning Up Your Spot Requests and Instances Lastly, we need to clean up our requests and instances. It is important to both cancel any outstanding requests :emphasis:`and` terminate any instances. Just canceling your requests will not terminate your instances, which means that you will continue to pay for them. If you terminate your -instances, your Spot requests may be canceled, but there are some scenarios |mdash| such as if you -use persistent bids|mdash|where terminating your instances is not sufficient to stop your request +instances, your Spot requests may be canceled, but there are some scenarios such as if you +use persistent bids where terminating your instances is not sufficient to stop your request from being re-fulfilled. Therefore, it is a best practice to both cancel any active bids and terminate any running instances. From ab6844c50aa6e8e56bf5d93aab3e64f5f24db0e6 Mon Sep 17 00:00:00 2001 From: Soo Sung Date: Mon, 9 Jul 2018 17:29:01 -0700 Subject: [PATCH 028/139] fixing code snippet for missing closing bracket --- doc_source/snippets/sts_basic_session_creds.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_source/snippets/sts_basic_session_creds.java b/doc_source/snippets/sts_basic_session_creds.java index c37c7c5..770a638 100644 --- a/doc_source/snippets/sts_basic_session_creds.java +++ b/doc_source/snippets/sts_basic_session_creds.java @@ -17,5 +17,5 @@ session_creds.getSessionToken()); AmazonS3 s3 = AmazonS3ClientBuilder.standard() - .withCredentials(new AWSStaticCredentialsProvider(sessionCredentials) + .withCredentials(new AWSStaticCredentialsProvider(sessionCredentials)) .build(); From 2265fd26efd5df2eeb7554f8abc0945eb6ff2cb4 Mon Sep 17 00:00:00 2001 From: Soo Sung Date: Wed, 18 Jul 2018 17:01:50 -0700 Subject: [PATCH 029/139] fixing line alignment in s3 examples per customer feedback --- doc_source/examples-s3-transfermanager.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/doc_source/examples-s3-transfermanager.rst b/doc_source/examples-s3-transfermanager.rst index efaf70b..8a551e9 100644 --- a/doc_source/examples-s3-transfermanager.rst +++ b/doc_source/examples-s3-transfermanager.rst @@ -99,7 +99,7 @@ providing the following: .. uploadFileList() method in the example code... .. literalinclude:: example_code/s3/src/main/java/aws/example/s3/XferMgrUpload.java - :lines: 60-69, 71, 73-77 + :lines: 61-69, 71, 73-77 :dedent: 8 :language: java @@ -176,7 +176,7 @@ Use the |xfermgr|'s :methodname:`download` method, providing the .. downloadFile() method in the example code... .. literalinclude:: example_code/s3/src/main/java/aws/example/s3/XferMgrDownload.java - :lines: 57-61, 63, 65-69 + :lines: 59-62, 64, 66-70 :dedent: 8 :language: java @@ -207,7 +207,7 @@ into on your local system. If the named directory doesn't exist yet, it will be .. downloadFile() method in the example code... .. literalinclude:: example_code/s3/src/main/java/aws/example/s3/XferMgrDownload.java - :lines: 36-40, 42, 44-48 + :lines: 37-41, 43, 45-49 :dedent: 8 :language: java @@ -254,7 +254,7 @@ occurs. .. the waitForCompletion() function in XferMgrProgress.java .. literalinclude:: example_code/s3/src/main/java/aws/example/s3/XferMgrProgress.java - :lines: 34-45 + :lines: 35-46 :dedent: 8 :language: java @@ -326,7 +326,7 @@ prints its final state. .. the showTransferProgress() function in XferMgrProgress.java .. literalinclude:: example_code/s3/src/main/java/aws/example/s3/XferMgrProgress.java - :lines: 56-61, 64-67, 70 + :lines: 56-62, 65-68, 71-74 :dedent: 8 :language: java @@ -359,7 +359,7 @@ object. You can use the object to get the total bytes of the operation by callin .. the uploadFileWithListener() function in XferMgrProgress.java .. literalinclude:: example_code/s3/src/main/java/aws/example/s3/XferMgrProgress.java - :lines: 146-149, 152-154, 157-159, 162-168 + :lines: 146-150, 153-155, 158-168 :dedent: 8 :language: java @@ -388,7 +388,7 @@ subtransfer. .. the showMultiUploadProgress() function in XferMgrProgress.java .. literalinclude:: example_code/s3/src/main/java/aws/example/s3/XferMgrProgress.java - :lines: 82-83 + :lines: 83-84 :dedent: 8 :language: java From 62bec7a92354235305b9f44d80aa562e74a431f4 Mon Sep 17 00:00:00 2001 From: Soo Sung Date: Wed, 24 Oct 2018 14:31:06 -0700 Subject: [PATCH 030/139] fixing default connection timeout seconds to 10s instead of 50s --- doc_source/section-client-configuration.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_source/section-client-configuration.rst b/doc_source/section-client-configuration.rst index 341a8e7..045e96f 100644 --- a/doc_source/section-client-configuration.rst +++ b/doc_source/section-client-configuration.rst @@ -70,7 +70,7 @@ You can set options related to timeouts and handling errors with HTTP connection * :strong:`Connection Timeout` The connection timeout is the amount of time (in milliseconds) that the HTTP connection will wait - to establish a connection before giving up. The default is 50,000 ms. + to establish a connection before giving up. The default is 10,000 ms. To set this value yourself, use the :aws-java-ref:`ClientConfiguration.setConnectionTimeout ` method. From 49cb3cb17450829dbbbbe9f6c22a4e7e07f7b735 Mon Sep 17 00:00:00 2001 From: madhead Date: Wed, 31 Oct 2018 16:15:05 +0300 Subject: [PATCH 031/139] Fix #34: Gradle 4.6+ dependency BOM support example --- doc_source/setup-project-gradle.rst | 60 +++++++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 4 deletions(-) diff --git a/doc_source/setup-project-gradle.rst b/doc_source/setup-project-gradle.rst index 1adf58c..250619e 100644 --- a/doc_source/setup-project-gradle.rst +++ b/doc_source/setup-project-gradle.rst @@ -12,11 +12,63 @@ Using the SDK with Gradle ######################### -To use the |sdk-java| in your Gradle_ project, use Spring's `dependency management plugin -`_ for Gradle, which can be -used to import the SDK's Maven Bill of Materials (BOM) to manage SDK dependencies for your project. +`Since Gradle_ 4.6`_ it is possible to +use Gradle's improved POM support feature for importing bill of materials (BOM) files by simply declaring a dependency on a BOM. -.. topic:: To configure the SDK for Gradle +.. topic:: To configure the SDK for Gradle 4.6 and upper + + #. Enable `IMPROVED_POM_SUPPORT` feature in :file:`settings.gradle` file (not needed in Gradle 5 and upper) + + .. code-block:: groovy + + enableFeaturePreview('IMPROVED_POM_SUPPORT') + + #. Import BOM as a usual dependency in the *dependencies* section + + .. code-block:: groovy + + dependencies { + implementation 'com.amazonaws:aws-java-sdk-bom:1.11.228' + } + + #. Specify the SDK modules that you'll be using in the *dependencies* section + + .. code-block:: groovy + + dependencies { + implementation 'com.amazonaws:aws-java-sdk-s3' + testCompile group: 'junit', name: 'junit', version: '4.11' + } + +Gradle will automatically resolve the correct version of your SDK dependencies using the information +from the BOM. + +Here's the complete :file:`build.gradle` file: + +.. code-block:: groovy + + group 'aws.test' + version '1.0-SNAPSHOT' + + apply plugin: 'java' + + sourceCompatibility = 1.8 + + repositories { + mavenCentral() + } + + dependencies { + implementation 'com.amazonaws:aws-java-sdk-bom:1.11.228' + implementation 'com.amazonaws:aws-java-sdk-s3' + testCompile group: 'junit', name: 'junit', version: '4.11' + } + +Gradle versions prior to 4.6 lack of native BOM support, so Spring's `dependency management plugin +`_ for Gradle can be used +to import the SDK's Maven Bill of Materials (BOM) to manage SDK dependencies for your project. + +.. topic:: To configure the SDK for Gradle prior 4.6 #. Add the dependency management plugin to your :file:`build.gradle` file From e94faa2d84dacab17963ed921c2a1b919f99f2e8 Mon Sep 17 00:00:00 2001 From: Soo Sung Date: Wed, 28 Nov 2018 13:56:06 -0800 Subject: [PATCH 032/139] fixing SDK v2 version references --- doc_source/welcome.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc_source/welcome.rst b/doc_source/welcome.rst index 256d4d3..228a93d 100644 --- a/doc_source/welcome.rst +++ b/doc_source/welcome.rst @@ -12,7 +12,7 @@ :description: Welcome to the AWS Java Developer Guide -.. _`aws sdk for java 2.0 developer guide`: http://docs.aws.amazon.com/sdk-for-java/v2/developer-guide/welcome.html +.. _`aws sdk for java 2.x developer guide`: http://docs.aws.amazon.com/sdk-for-java/v2/developer-guide/welcome.html ################################ @@ -24,11 +24,11 @@ applications that work with |S3|, |EC2|, |SDB|, and more. We regularly add suppo to the |sdk-java|. For a list of the supported services and their API versions that are included with each release of the SDK, view the `release notes`_ for the version that you're working with. -AWS SDK for Java 2.0 Developer Preview -====================================== -Take a look at the new AWS SDK for Java 2.0 developer preview at https://github.com/aws/aws-sdk-java-v2/. +AWS SDK for Java 2.x +===================== +Take a look at the new AWS SDK for Java 2.x at https://github.com/aws/aws-sdk-java-v2/. It includes much awaited features, such as a way to plug in a HTTP implementation. To get started, -see the `AWS SDK for Java 2.0 Developer Guide`_. +see the `AWS SDK for Java 2.x Developer Guide`_. .. _additional-resources: From 5e4a5bbf7818638b4b2c5ab24b904b7fe1a52de3 Mon Sep 17 00:00:00 2001 From: Matthew Patton Date: Tue, 18 Dec 2018 22:33:13 -0500 Subject: [PATCH 033/139] remove long-obsolete variable AWS_REGION --- doc_source/java-dg-region-selection.rst | 2 +- doc_source/swf-hello.rst | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc_source/java-dg-region-selection.rst b/doc_source/java-dg-region-selection.rst index de6e25c..165d527 100644 --- a/doc_source/java-dg-region-selection.rst +++ b/doc_source/java-dg-region-selection.rst @@ -132,7 +132,7 @@ Default Region Provider Chain #. Any explicit region set by using :methodname:`withRegion` or :methodname:`setRegion` on the builder itself takes precedence over anything else. -#. The :envvar:`AWS_REGION` environment variable is checked. If it's set, that region is +#. The :envvar:`AWS_DEFAULT_REGION` environment variable is checked. If it's set, that region is used to configure the client. .. note:: This environment variable is set by the |LAM| container. diff --git a/doc_source/swf-hello.rst b/doc_source/swf-hello.rst index 514fabe..c605c1d 100644 --- a/doc_source/swf-hello.rst +++ b/doc_source/swf-hello.rst @@ -83,7 +83,7 @@ signing up for AWS and creating an |IAM| user (recommended over using root accou This tutorial uses the terminal (command-line) to run the example code, and expects that you have your AWS credentials and configuration accessible to the SDK. The easiest way to do this is to use the environment variables :envvar:`AWS_ACCESS_KEY_ID` and :envvar:`AWS_SECRET_ACCESS_KEY`. You -should also set the :envvar:`AWS_REGION` to the region you want to use. +should also set the :envvar:`AWS_DEFAULT_REGION` to the region you want to use. For example, on |unixes|, set the variables this way: @@ -91,7 +91,7 @@ For example, on |unixes|, set the variables this way: export AWS_ACCESS_KEY_ID=your_access_key_id export AWS_SECRET_ACCESS_KEY=your_secret_access_key - export AWS_REGION=us-east-1 + export AWS_DEFAULT_REGION=us-east-1 To set these variables on Windows, use these commands: @@ -99,7 +99,7 @@ To set these variables on Windows, use these commands: set AWS_ACCESS_KEY_ID=your_access_key_id set AWS_SECRET_ACCESS_KEY=your_secret_access_key - set AWS_REGION=us-east-1 + set AWS_DEFAULT_REGION=us-east-1 .. important:: Substitute your own access key, secret access key and region information for the example values shown here. From 4f490d5d3e655a32c69d7dbacd918421a2f330c4 Mon Sep 17 00:00:00 2001 From: Soo Sung Date: Mon, 18 Feb 2019 11:09:12 -0800 Subject: [PATCH 034/139] adding sdk metrics topic --- doc_source/generating-sdk-metrics.rst | 15 +- doc_source/getting-started.rst | 2 +- doc_source/sdk-metrics.rst | 354 ++++++++++++++++++++++++++ 3 files changed, 367 insertions(+), 4 deletions(-) mode change 100644 => 100755 doc_source/generating-sdk-metrics.rst mode change 100644 => 100755 doc_source/getting-started.rst create mode 100755 doc_source/sdk-metrics.rst diff --git a/doc_source/generating-sdk-metrics.rst b/doc_source/generating-sdk-metrics.rst old mode 100644 new mode 100755 index 0f84966..3c25c58 --- a/doc_source/generating-sdk-metrics.rst +++ b/doc_source/generating-sdk-metrics.rst @@ -8,6 +8,10 @@ either express or implied. See the License for the specific language governing permissions and limitations under the License. +.. |CSMlong| replace:: AWS SDK Metrics for Enterprise Support +.. |CSM| replace:: SDK Metrics + + ################################### Enabling Metrics for the |sdk-java| ################################### @@ -18,10 +22,15 @@ The |sdk-java| can generate metrics for visualization and monitoring with |cw|_ * the performance of your JVMs when used with AWS * runtime environment details such as heap memory, number of threads, and opened file descriptors -How to Enable SDK Metric Generation -=================================== +.. note:: The |CSMlong| is another option for gathering metrics about your application. + |CSM| is an |AWS| service that publishes data to |CWlong| and enables you to share metric data with AWS Support + for easier troubleshooting. See :doc:`sdk-metrics` to learn how to enable the |CSM| + service for your application. + +How to Enable |sdk-java| Metric Generation +========================================== -SDK metrics are *disabled by default*. To enable it for your local development environment, include +|sdk-java| metrics are *disabled by default*. To enable it for your local development environment, include a system property that points to your AWS security credential file when starting up the JVM. For example:: diff --git a/doc_source/getting-started.rst b/doc_source/getting-started.rst old mode 100644 new mode 100755 index 44b1963..738611c --- a/doc_source/getting-started.rst +++ b/doc_source/getting-started.rst @@ -23,4 +23,4 @@ This section provides information about how to install, set up, and use the |sdk setup-credentials setup-project-maven setup-project-gradle - + sdk-metrics diff --git a/doc_source/sdk-metrics.rst b/doc_source/sdk-metrics.rst new file mode 100755 index 0000000..721e8bb --- /dev/null +++ b/doc_source/sdk-metrics.rst @@ -0,0 +1,354 @@ +.. Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 + International License (the "License"). You may not use this file except in compliance with the + License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. + + This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + either express or implied. See the License for the specific language governing permissions and + limitations under the License. + +.. |language| replace:: Java +.. |sdk| replace:: |sdk-java| +.. |SDKM| replace:: SDK Metrics +.. |SDKMlong| replace:: AWS SDK Metrics for Enterprise Support + +#################### +Enabling |SDKMlong| +#################### + +|SDKMlong| (|SDKM|\) enables Enterprise customers to collect metrics from |AWS| SDKs on their hosts and clients shared with +|AWS| Enterprise Support. |SDKM| provides information that helps speed up detection and diagnosis of issues occurring in connections +to AWS services for AWS Enterprise Support customers. + +As telemetry is collected on each host, it is relayed via UDP to 127.0.0.1 (aka localhost), where the |CW| agent aggregates the data and sends it +to the |SDKM| service. Therefore, to receive metrics, the |CW| agent is required to be added to your instance. + +The following steps to set up |SDKM| pertain to an |EC2| instance running Amazon Linux for a client application that is using the |sdk|. +|SDKM| is also available for your production environments if you enable it while configuring the |sdk|. + +To utilize |SDKM|, run the latest version of the |CW| agent. Learn how to +:CW-dg:`Configure the CloudWatch Agent for SDK Metrics` in the |CW-dg|. + +To set up |SDKM| with the |sdk|, follow these instructions: + +#. Create an application with an |sdk| client to use an AWS service. +#. Host your project on an |EC2| instance or in your local environment. +#. Install and use the latest 1.x version of the |sdk|. +#. Install and configure an |CW| agent on an EC2 instance or in your local environment. +#. Authorize |SDKM| to collect and send metrics. +#. :ref:`csm-enable-agent`. + +For more information, see the following: + +* :ref:`csm-update-agent` +* :ref:`csm-disable-agent` + + +.. _csm-enable-agent: + +Enable |SDKM| for the |sdk| +=========================== + +By default, |SDKM| is turned off, and the port is set to 31000. The following are the default parameters. + +.. code-block:: ini + + //default values + [ + 'enabled' => false, + 'port' => 31000, + ] + +Enabling |SDKM| is independent of configuring your credentials to use an AWS service. + +You can enable |SDKM| using one of 4 options. + +* :ref:`csm-enable-agent-code` +* :ref:`csm-enable-agent-environ` +* :ref:`csm-enable-agent-java-prop` +* :ref:`csm-enable-agent-shared-config` + +.. _csm-enable-agent-code: + +Option 1: Set |SDKM| in Code +---------------------------- + +The |language| implementation allows you to set |SDKM| configurations within code when building +a service client. +The values set in code override any configurations set in the other options described below. + +.. code-block:: java + + CsmConfiguration csmConfig = new CsmConfiguration(true, MY_PORT, MY_CLIENT_ID); + AmazonDynamoDB dynamodb = AmazonDynamoDBClientBuilder.standard() + .withClientSideMonitoringConfigurationProvider(new StaticCsmConfigurationProvider(csmConfig)) + .build(); + +.. _csm-enable-agent-environ: + +Option 2: Set Environment Variables +----------------------------------- + +If :code:`AWS_CSM_ENABLED` is not set, the SDK first checks the profile specified in +the environment variable under :code:`AWS_PROFILE` to determine if |SDKM| is enabled. +By default this is set to ``false``. + +To turn on |SDKM|, add the following to your environmental variables. + +.. code-block:: ini + + export AWS_CSM_ENABLED=true + +:ref:`Other configuration settings` are available. + +Note: Enabling |SDKM| does not configure your credentials to use an AWS service. + +.. _csm-enable-agent-java-prop: + +Option 3: Set Java System Property +---------------------------------- + +If no |SDKM| configuration is found in the environment variables, +the SDK looks at certain Java system properties. + +To turn on |SDKM|, pass the following system property flag when you execute your application. + +.. code-block:: ini + + -Dcom.amazonaws.sdk.csm.enabled="true" + +You can also set the value programmatically using the Properties object. + +.. code-block:: java + + Properties props = System.getProperties(); + props.setProperty("com.amazonaws.sdk.csm.enabled", "true"); + +:ref:`Other configuration settings` are available. + +Note: Enabling |SDKM| does not configure your credentials to use an AWS service. + +.. _csm-enable-agent-shared-config: + +Option 4: AWS Shared Config File +-------------------------------- + +If no |SDKM| configuration is found in the environment variables or the Java system properties, +the SDK looks for your default AWS profile field. If :code:`AWS_DEFAULT_PROFILE` is set to +something other than default, update that profile. +To enable |SDKM|, add :code:`csm_enabled` to the shared config file located at :file:`~/.aws/config`. + +.. code-block:: ini + + [default] + csm_enabled = true + + [profile aws_csm] + csm_enabled = true + +:ref:`Other configuration settings` are available. + +Note: Enabling |SDKM| is independent from configuring your credentials to use an AWS service. You can use a different profile to authenticate. + +.. _csm-update-agent: + +Update a |CW| Agent +=================== + +To make changes to the port, you need to set the values and then restart any AWS jobs that are currently active. + +Option 1: Set Environment Variables +----------------------------------- + +Most services use +the default port. But if your service requires a unique port ID, add `AWS_CSM_PORT=[port_number]`, to the host's environment variables. + +.. code-block:: shell + + export AWS_CSM_ENABLED=true + export AWS_CSM_PORT=1234 + +Option 2: Set Java System Property +----------------------------------- + +Most services use the default port. +But if your service requires a unique port ID, specify the `-Dcom.amazonaws.sdk.csm.port=[port_number]` +system properties flag when executing your application. + +.. code-block:: ini + + com.amazonaws.sdk.csm.enabled=true + com.amazonaws.sdk.csm.port=1234 + +Option 3: AWS Shared Config File +----------------------------------- + +Most services use the default port. But if your service requires a +unique port ID, add `csm_port = [port_number]` to `~/.aws/config`. + +.. code-block:: ini + + [default] + csm_enabled = false + csm_port = 1234 + + [profile aws_csm] + csm_enabled = false + csm_port = 1234 + +Restart |SDKM| +-------------- + +To restart a job, run the following commands. + +.. code-block:: shell + + amazon-cloudwatch-agent-ctl –a stop; + amazon-cloudwatch-agent-ctl –a start; + + +.. _csm-disable-agent: + +Disable |SDKM| +============== + +To turn off |SDKM|, set `csm_enabled` to `false` in your environment variables, or in your AWS Shared config file located at :file:`~/.aws/config`. +Then restart your |CW| agent so that the changes can take effect. + +**Environment Variables** + +.. code-block:: shell + + export AWS_CSM_ENABLED=false + + +**AWS Shared Config File** + +Remove `csm_enabled` from the profiles in your AWS Shared config file located at :file:`~/.aws/config`. + +.. note:: Environment variables override the AWS Shared config file. If |SDKM| is enabled in the environment variables, the |SDKM| remain enabled. + +.. code-block:: ini + + [default] + csm_enabled = false + + [profile aws_csm] + csm_enabled = false + +To disable |SDKM|, use the following command to stop |CW| agent. + +.. code-block:: shell + + sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a stop && + echo "Done" + +If you are using other |CW| features, restart the |CW| agent with the following command. + +.. code-block:: shell + + amazon-cloudwatch-agent-ctl –a start; + + +Restart |SDKM| +-------------- + +To restart a |SDKM|, run the following commands. + +.. code-block:: shell + + amazon-cloudwatch-agent-ctl –a stop; + amazon-cloudwatch-agent-ctl –a start; + + +Definitions for |SDKM| +====================== + +You can use the following descriptions of |SDKM| to interpret your results. In general, these metrics are available for review +with your Technical Account Manager during regular business reviews. AWS Support resources and your Technical Account Manager +should have access to SDK Metrics data to help you resolve cases, but if you discover data that is confusing or unexpected, but +doesn’t seem to be negatively impacting your applications’ performance, it is best to review that data during scheduled +business reviews. + +.. list-table:: + :widths: 1 2 + :header-rows: 1 + + * - Metric: + - CallCount + + * - Definition + - Total number of successful or failed API calls from your code to AWS services + + * - How to use it + - Use it as a baseline to correlate with other metrics like errors or throttling. + + +.. list-table:: + :widths: 1 2 + :header-rows: 1 + + * - Metric: + - ClientErrorCount + + * - Definition + - Number of API calls that fail with client errors (4xx HTTP response codes). *Examples: Throttling, Access denied, S3 bucket does not exist, and Invalid parameter value.* + + * - How to use it + - Except in certain cases related to throttling (ex. when throttling occurs due to a limit that needs to be increased) this metric can indicate something in your application that needs to be fixed. + + +.. list-table:: + :widths: 1 2 + :header-rows: 1 + + * - Metric: + - ConnectionErrorCount + + * - Definition + - Number of API calls that fail because of errors connecting to the service. These can be caused by network issues between the customer application and AWS services including load balancers, DNS failures, transit providers. In some cases, AWS issues may result in this error. + + * - How to use it + - Use this metric to determine whether issues are specific to your application or are caused by your infrastructure and/or network. High ConnectionErrorCount could also indicate short timeout values for API calls. + + +.. list-table:: + :widths: 1 2 + :header-rows: 1 + + * - Metric: + - ThrottleCount + + * - Definition + - Number of API calls that fail due to throttling by AWS services. + + * - How to use it + - Use this metric to assess if your application has reached throttle limits, as well as to determine the cause of retries and application latency. Consider distributing calls over a window instead of batching your calls. + + +.. list-table:: + :widths: 1 2 + :header-rows: 1 + + * - Metric: + - ServerErrorCount + + * - Definition + - Number of API calls that fail due to server errors (5xx HTTP response codes) from AWS Services. These are typically caused by AWS services. + + * - How to use it + - Determine cause of SDK retries or latency. This metric will not always indicate that AWS services are at fault, as some AWS teams classify latency as an HTTP 503 response. + +.. list-table:: + :widths: 1 2 + :header-rows: 1 + + * - Metric: + - EndToEndLatency + + * - Definition + - Total time for your application to make a call using the AWS SDK, inclusive of retries. In other words, regardless of whether it is successful after several attempts, or as soon as a call fails due to an unretriable error. + + * - How to use it + - Determine how AWS API calls contribute to your application’s overall latency. Higher than expected latency may be caused by issues with network, firewall, or other configuration settings, or by latency that occurs as a result of SDK retries. From bc1bc581286f4feb0328885c2907a2ffde2c8ef1 Mon Sep 17 00:00:00 2001 From: Soo Sung Date: Fri, 15 Mar 2019 10:32:44 -0700 Subject: [PATCH 035/139] updating client shutdown recommendation --- doc_source/creating-clients.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc_source/creating-clients.rst b/doc_source/creating-clients.rst index fe1b14b..d35a445 100644 --- a/doc_source/creating-clients.rst +++ b/doc_source/creating-clients.rst @@ -139,8 +139,10 @@ Client Lifecycle ================ Service clients in the SDK are thread-safe and, for best performance, you should treat them as -long-lived objects. Each client has its own connection pool resource that is shut down when the -client is garbage collected. To explicitly shut down a client, call the +long-lived objects. Each client has its own connection pool resource. +Explicitly shut down clients when they are no longer needed to avoid resource leaks. + +To explicitly shut down a client, call the :methodname:`shutdown` method. After calling :methodname:`shutdown`, all client resources are released and the client is unusable. @@ -151,4 +153,3 @@ released and the client is unusable. AmazonDynamoDB ddb = AmazonDynamoDBClientBuilder.defaultClient(); ddb.shutdown(); // Client is now unusable - From d57059f3afcde8c267da37b1d97c2e9125672970 Mon Sep 17 00:00:00 2001 From: Jami Schwarzwalder Date: Tue, 16 Apr 2019 17:06:15 -0700 Subject: [PATCH 036/139] Updating the description of the Developer Guide to match documentation hub --- doc_source/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_source/index.rst b/doc_source/index.rst index 8abe472..4c68e99 100644 --- a/doc_source/index.rst +++ b/doc_source/index.rst @@ -13,7 +13,7 @@ ########## .. meta:: - :description: Developer Guide for the AWS SDK for Java + :description: Describes the various features of the SDK and how to use them. :keywords: java, sdk, aws .. toctree:: From 37a07dd72aef691d4f5927830dd9afc9ca3f8a1b Mon Sep 17 00:00:00 2001 From: Jami Schwarzwalder Date: Wed, 1 May 2019 13:41:25 -0700 Subject: [PATCH 037/139] updating STS client --- doc_source/prog-services-sts.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_source/prog-services-sts.rst b/doc_source/prog-services-sts.rst index 59e7400..666f305 100644 --- a/doc_source/prog-services-sts.rst +++ b/doc_source/prog-services-sts.rst @@ -66,7 +66,7 @@ Retrieve temporary security credentials from |STS| .. code-block:: java - AWSSecurityTokenServiceClient sts_client = new AWSSecurityTokenServiceClient(); + AWSSecurityTokenServiceClient sts_client = new AWSSecurityTokenServiceClientBuilder().standard().build(); When creating the client with no arguments, the default credential provider chain is used to retrieve credentials. You can provide a specific credential provider if you want. For more From 14f8bb46d62aa28c9e10a9de4f3e7e97aff1d308 Mon Sep 17 00:00:00 2001 From: Jami Schwarzwalder Date: Tue, 7 May 2019 12:19:51 -0700 Subject: [PATCH 038/139] Removing dead link --- doc_source/section-client-configuration.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/doc_source/section-client-configuration.rst b/doc_source/section-client-configuration.rst index 045e96f..a552071 100644 --- a/doc_source/section-client-configuration.rst +++ b/doc_source/section-client-configuration.rst @@ -127,5 +127,4 @@ explicitly raise the maximum TCP buffer size limit. Many resources are available to help with configuring TCP buffer sizes and operating system-specific TCP settings, including the following: -* `TCP Tuning and Network Troubleshooting `_ * `Host Tuning `_ From 16b6a39f57588f4aafdb419a6816b49ab882f048 Mon Sep 17 00:00:00 2001 From: Jami Schwarzwalder Date: Mon, 13 May 2019 12:59:43 -0700 Subject: [PATCH 039/139] Update swf-hello.rst --- doc_source/swf-hello.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc_source/swf-hello.rst b/doc_source/swf-hello.rst index c605c1d..514fabe 100644 --- a/doc_source/swf-hello.rst +++ b/doc_source/swf-hello.rst @@ -83,7 +83,7 @@ signing up for AWS and creating an |IAM| user (recommended over using root accou This tutorial uses the terminal (command-line) to run the example code, and expects that you have your AWS credentials and configuration accessible to the SDK. The easiest way to do this is to use the environment variables :envvar:`AWS_ACCESS_KEY_ID` and :envvar:`AWS_SECRET_ACCESS_KEY`. You -should also set the :envvar:`AWS_DEFAULT_REGION` to the region you want to use. +should also set the :envvar:`AWS_REGION` to the region you want to use. For example, on |unixes|, set the variables this way: @@ -91,7 +91,7 @@ For example, on |unixes|, set the variables this way: export AWS_ACCESS_KEY_ID=your_access_key_id export AWS_SECRET_ACCESS_KEY=your_secret_access_key - export AWS_DEFAULT_REGION=us-east-1 + export AWS_REGION=us-east-1 To set these variables on Windows, use these commands: @@ -99,7 +99,7 @@ To set these variables on Windows, use these commands: set AWS_ACCESS_KEY_ID=your_access_key_id set AWS_SECRET_ACCESS_KEY=your_secret_access_key - set AWS_DEFAULT_REGION=us-east-1 + set AWS_REGION=us-east-1 .. important:: Substitute your own access key, secret access key and region information for the example values shown here. From 96104b64b09cf811503769fcb2eada04a6b7094f Mon Sep 17 00:00:00 2001 From: Jami Schwarzwalder Date: Mon, 13 May 2019 13:03:28 -0700 Subject: [PATCH 040/139] Updating the Environment Variable for Regions --- doc_source/java-dg-region-selection.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_source/java-dg-region-selection.rst b/doc_source/java-dg-region-selection.rst index 165d527..de6e25c 100644 --- a/doc_source/java-dg-region-selection.rst +++ b/doc_source/java-dg-region-selection.rst @@ -132,7 +132,7 @@ Default Region Provider Chain #. Any explicit region set by using :methodname:`withRegion` or :methodname:`setRegion` on the builder itself takes precedence over anything else. -#. The :envvar:`AWS_DEFAULT_REGION` environment variable is checked. If it's set, that region is +#. The :envvar:`AWS_REGION` environment variable is checked. If it's set, that region is used to configure the client. .. note:: This environment variable is set by the |LAM| container. From 0dfce3ab683a21b395b84d8c9bcdadd2c291304a Mon Sep 17 00:00:00 2001 From: Jami Schwarzwalder Date: Mon, 3 Jun 2019 12:23:34 -0700 Subject: [PATCH 041/139] fixing gradle BOM dependency instructions. --- doc_source/setup-project-gradle.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_source/setup-project-gradle.rst b/doc_source/setup-project-gradle.rst index 250619e..369109d 100644 --- a/doc_source/setup-project-gradle.rst +++ b/doc_source/setup-project-gradle.rst @@ -28,7 +28,7 @@ use Gradle's improved POM support feature for importing bill of materials (BOM) .. code-block:: groovy dependencies { - implementation 'com.amazonaws:aws-java-sdk-bom:1.11.228' + implementation platform('com.amazonaws:aws-java-sdk-bom:1.11.228') } #. Specify the SDK modules that you'll be using in the *dependencies* section From a229c4a59ec7414c0c583c90ad9b12b4d48548cb Mon Sep 17 00:00:00 2001 From: Jami Schwarzwalder Date: Fri, 7 Jun 2019 17:54:43 -0700 Subject: [PATCH 042/139] Describe expected values when creating a DynamoDB table. --- doc_source/examples-dynamodb-tables.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc_source/examples-dynamodb-tables.rst b/doc_source/examples-dynamodb-tables.rst index 5a27dbd..faff57d 100644 --- a/doc_source/examples-dynamodb-tables.rst +++ b/doc_source/examples-dynamodb-tables.rst @@ -53,7 +53,8 @@ Create a Table Use the :aws-java-class:`DynamoDB client `'s :methodname:`createTable` method to create a new |DDB| table. You need to construct table attributes and a table schema, both of which are used to identify the primary key of your table. You -must also supply initial provisioned throughput values and a table name. +must also supply initial provisioned throughput values and a table name. Only define key table attributes +when creating your |DDB| table. .. note:: If a table with the name you chose already exists, an :aws-java-class:`AmazonServiceException` is thrown. @@ -71,7 +72,7 @@ must also supply initial provisioned throughput values and a table name. Create a Table with a Simple Primary Key ---------------------------------------- -This code creates a table with a simple primary key ("Name"). +This code creates a table with a simple primary key ("Name"). **Code** From 1bd4cc8b4555ab5e670e34cc3337c301d40fa4ec Mon Sep 17 00:00:00 2001 From: Jami Schwarzwalder Date: Tue, 25 Jun 2019 18:20:44 -0700 Subject: [PATCH 043/139] adding code snippet references to kms article --- doc_source/examples-crypto-kms.rst | 40 ++++++++++++------------ doc_source/examples-crypto-masterkey.rst | 28 ++++++----------- 2 files changed, 30 insertions(+), 38 deletions(-) diff --git a/doc_source/examples-crypto-kms.rst b/doc_source/examples-crypto-kms.rst index ab7c5bc..68bc328 100644 --- a/doc_source/examples-crypto-kms.rst +++ b/doc_source/examples-crypto-kms.rst @@ -41,8 +41,7 @@ Import the following classes for these examples. **Imports** -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/S3Encrypt.java - :lines: 16-31 +.. literalinclude:: s3.java1.s3_encrypt.import.txt :language: java .. _encryption-only-kms: @@ -57,8 +56,7 @@ managed key for encryption, pass the |KMS| key ID or alias to the **Code** -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/S3Encrypt.java - :lines: 237-243 +.. literalinclude:: s3.java1.s3_encrypt.kms_encryption_only_build.txt :dedent: 8 :language: java @@ -67,8 +65,7 @@ Call the :methodname:`putObject` method on the |S3| encryption client to upload **Code** -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/S3Encrypt.java - :lines: 247 +.. literalinclude:: s3.java1.s3_encrypt.kms_encryption_only_put_object.txt :dedent: 8 :language: java @@ -77,12 +74,11 @@ You can retrieve the object using the same client. This example calls the **Code** -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/S3Encrypt.java - :lines: 249 +.. literalinclude:: s3.java1.s3_encrypt.kms_encryption_only_retrieve.txt :dedent: 8 :language: java -See the :sdk-examples-java-s3:`complete example ` on GitHub. +See the :sdk-examples-java-s3:`complete example ` on GitHub. .. _authenticated-encryption-kms: @@ -106,23 +102,21 @@ To enable this mode, specify the :classname:`AuthenticatedEncryption` value in t **Code** -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/S3Encrypt.java - :lines: 257-263 +.. literalinclude:: s3.java1.s3_encrypt.kms_authenticated_encryption_builder.txt :dedent: 8 :language: java - + The :classname:`AuthenticatedEncryption` mode can retrieve unencrypted objects and objects encrypted with :classname:`EncryptionOnly` mode. The following example shows the |S3| encryption client retrieving an unencrypted object. **Code** -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/S3Encrypt.java - :lines: 257-270 +.. literalinclude:: s3.java1.s3_encrypt.kms_authenticated_encryption_put_object.txt :dedent: 8 :language: java -See the :sdk-examples-java-s3:`complete example ` on GitHub. +See the :sdk-examples-java-s3:`complete example ` on GitHub. .. _strict-authenticated-encryption-kms: @@ -138,8 +132,15 @@ To enable this mode, specify the :classname:`StrictAuthenticatedEncryption` valu **Code** -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/S3Encrypt.java - :lines: 278-284 +.. literalinclude:: s3.java1.s3_encrypt.kms_authenticated_encryption_strict_builder.txt + :dedent: 8 + :language: java + +Call the :methodname:`putObject` method on the |S3| encryption client to upload objects. + +**Code** + +.. literalinclude:: s3.java1.s3_encrypt.kms_authenticated_encryption_strict_put_object.txt :dedent: 8 :language: java @@ -149,9 +150,8 @@ authenticated mode. **Code** -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/S3Encrypt.java - :lines: 278-295 +.. literalinclude:: s3.java1.s3_encrypt.kms_authenticated_encryption_strict_exception.txt :dedent: 8 :language: java -See the :sdk-examples-java-s3:`complete example ` on GitHub. +See the :sdk-examples-java-s3:`complete example ` on GitHub. diff --git a/doc_source/examples-crypto-masterkey.rst b/doc_source/examples-crypto-masterkey.rst index 7a211e3..92c06a7 100644 --- a/doc_source/examples-crypto-masterkey.rst +++ b/doc_source/examples-crypto-masterkey.rst @@ -40,8 +40,7 @@ Import the following classes for these examples. **Imports** -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/S3Encrypt.java - :lines: 16-24,26-31 +.. literalinclude:: s3.java1.s3_encrypt.import.txt :language: java .. _encryption-only: @@ -67,8 +66,7 @@ To use an asymmetric key or a key pair, simply pass the key pair to the same **Code** -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/S3Encrypt.java - :lines: 217-223 +.. literalinclude:: s3.java1.s3_encrypt.encryption_only_asymetric_key_build.txt :dedent: 8 :language: java @@ -76,8 +74,7 @@ Call the :methodname:`putObject` method on the |S3| encryption client to upload **Code** -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/S3Encrypt.java - :lines: 227 +.. literalinclude:: s3.java1.s3_encrypt.encryption_only_asymetric_key_put_object.txt :dedent: 8 :language: java @@ -86,12 +83,11 @@ You can retrieve the object using the same client. This example calls the **Code** -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/S3Encrypt.java - :lines: 229 +.. literalinclude:: s3.java1.s3_encrypt.encryption_only_asymetric_key_retrieve.txt :dedent: 8 :language: java -See the :sdk-examples-java-s3:`complete example ` on GitHub. +See the :sdk-examples-java-s3:`complete example ` on GitHub. .. _authenticated-encryption: @@ -114,8 +110,7 @@ To enable this mode, specify the :classname:`AuthenticatedEncryption` value in t **Code** -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/S3Encrypt.java - :lines: 67-72 +.. literalinclude:: s3.java1.s3_encrypt.strict_authenticated_encryption_build.txt :dedent: 8 :language: java @@ -125,8 +120,7 @@ objects encrypted with :classname:`EncryptionOnly` mode. The following example s **Code** -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/S3Encrypt.java - :lines: 66-79 +.. literalinclude:: s3.java1.s3_encrypt.strict_authenticated_encryption.txt :dedent: 8 :language: java @@ -146,8 +140,7 @@ To enable this mode, specify the :classname:`StrictAuthenticatedEncryption` valu **Code** -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/S3Encrypt.java - :lines: 132-137 +.. literalinclude:: s3.java1.s3_encrypt.strict_authenticated_encryption_build.txt :dedent: 8 :language: java @@ -157,9 +150,8 @@ authenticated mode. **Code** -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/S3Encrypt.java - :lines: 131-149 +.. literalinclude:: s3.java1.s3_encrypt.strict_authenticated_encryption.txt :dedent: 8 :language: java -See the :sdk-examples-java-s3:`complete example ` on GitHub. +See the :sdk-examples-java-s3:`complete example ` on GitHub. From d2e6cad2ac4af451140b3ab755b7ba515ecc849b Mon Sep 17 00:00:00 2001 From: Jami Schwarzwalder Date: Tue, 25 Jun 2019 18:46:32 -0700 Subject: [PATCH 044/139] adding code snippet references to s3 articles --- doc_source/examples-s3-transfermanager.rst | 57 +++++++------------ .../examples-s3-website-configuration.rst | 18 ++---- 2 files changed, 25 insertions(+), 50 deletions(-) diff --git a/doc_source/examples-s3-transfermanager.rst b/doc_source/examples-s3-transfermanager.rst index 8a551e9..5828351 100644 --- a/doc_source/examples-s3-transfermanager.rst +++ b/doc_source/examples-s3-transfermanager.rst @@ -51,16 +51,14 @@ represents the file to upload. **Imports** -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/XferMgrUpload.java - :lines: 16-18, 20 +.. literalinclude:: s3.java1.s3_xfer_mgr_upload.import.txt :language: java **Code** .. uploadFile() method in the example code... -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/XferMgrUpload.java - :lines: 93-97, 99, 101-105 +.. literalinclude:: s3.java1.s3_xfer_mgr_upload.single.txt :dedent: 8 :language: java @@ -90,16 +88,14 @@ providing the following: **Imports** -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/XferMgrUpload.java - :lines: 16-17, 19-21 +.. literalinclude:: s3.java1.s3_xfer_mgr_upload.import.txt :language: java **Code** .. uploadFileList() method in the example code... -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/XferMgrUpload.java - :lines: 61-69, 71, 73-77 +.. literalinclude:: s3.java1.s3_xfer_mgr_upload.list_of_files.txt :dedent: 8 :language: java @@ -123,16 +119,14 @@ recursively (*true* or *false*). **Imports** -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/XferMgrUpload.java - :lines: 16-20 +.. literalinclude:: s3.java1.s3_xfer_mgr_upload.import.txt :language: java **Code** .. uploadDir() method in the example code... -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/XferMgrUpload.java - :lines: 38-42, 44, 46-50 +.. literalinclude:: s3.java1.s3_xfer_mgr_upload.directory.txt :dedent: 8 :language: java @@ -167,16 +161,14 @@ Use the |xfermgr|'s :methodname:`download` method, providing the **Imports** -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/XferMgrDownload.java - :lines: 16-18, 20 +.. literalinclude:: s3.java1.s3_xfer_mgr_download.import.txt :language: java **Code** .. downloadFile() method in the example code... -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/XferMgrDownload.java - :lines: 59-62, 64, 66-70 +.. literalinclude:: s3.java1.s3_xfer_mgr_download.single.txt :dedent: 8 :language: java @@ -198,16 +190,14 @@ into on your local system. If the named directory doesn't exist yet, it will be **Imports** -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/XferMgrDownload.java - :lines: 16-17, 19-20 +.. literalinclude:: s3.java1.s3_xfer_mgr_download.import.txt :language: java **Code** .. downloadFile() method in the example code... -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/XferMgrDownload.java - :lines: 37-41, 43, 45-49 +.. literalinclude:: s3.java1.s3_xfer_mgr_download.directory.txt :dedent: 8 :language: java @@ -225,16 +215,14 @@ To copy an object from one S3 bucket to another, use the |xfermgr| :methodname:` **Imports** -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/XferMgrCopy.java - :lines: 16-18 +.. literalinclude:: s3.java1.s3_xfer_mgr_copy.import.txt :language: java **Code** .. copyObjectSimple() method in the example code... -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/XferMgrCopy.java - :lines: 35-38, 40, 42-46 +.. literalinclude:: s3.java1.s3_xfer_mgr_copy.copy_object.txt :dedent: 8 :language: java @@ -253,8 +241,7 @@ occurs. .. the waitForCompletion() function in XferMgrProgress.java -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/XferMgrProgress.java - :lines: 35-46 +.. literalinclude:: s3.java1.s3_xfer_mgr_progress.wait_for_transfer.txt :dedent: 8 :language: java @@ -317,16 +304,14 @@ prints its final state. **Imports** -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/XferMgrProgress.java - :lines: 22 +.. literalinclude:: s3.java1.s3_xfer_mgr_progress.import.txt :language: java **Code** .. the showTransferProgress() function in XferMgrProgress.java -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/XferMgrProgress.java - :lines: 56-62, 65-68, 71-74 +.. literalinclude:: s3.java1.s3_xfer_mgr_progress.poll.txt :dedent: 8 :language: java @@ -350,16 +335,14 @@ object. You can use the object to get the total bytes of the operation by callin **Imports** -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/XferMgrProgress.java - :lines: 16-18, 23, 25 +.. literalinclude:: s3.java1.s3_xfer_mgr_progress.import.txt :language: java **Code** .. the uploadFileWithListener() function in XferMgrProgress.java -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/XferMgrProgress.java - :lines: 146-150, 153-155, 158-168 +.. literalinclude:: s3.java1.s3_xfer_mgr_progress.progress_listener.txt :dedent: 8 :language: java @@ -379,16 +362,14 @@ subtransfer. **Imports** -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/XferMgrProgress.java - :lines: 23-24, 26-27 +.. literalinclude:: s3.java1.s3_xfer_mgr_progress.import.txt :language: java **Code** .. the showMultiUploadProgress() function in XferMgrProgress.java -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/XferMgrProgress.java - :lines: 83-84 +.. literalinclude:: s3.java1.s3_xfer_mgr_progress.substranferes.txt :dedent: 8 :language: java diff --git a/doc_source/examples-s3-website-configuration.rst b/doc_source/examples-s3-website-configuration.rst index 1a9329f..2b31a3c 100644 --- a/doc_source/examples-s3-website-configuration.rst +++ b/doc_source/examples-s3-website-configuration.rst @@ -33,15 +33,13 @@ Setting an index document is *required*; all other parameters are optional. **Imports** -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/SetWebsiteConfiguration.java - :lines: 15-18 +.. literalinclude:: s3.java1.s3_set_website_config.import.txt :language: java **Code** -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/SetWebsiteConfiguration.java +.. literalinclude:: s3.java1.s3_set_website_config.main.txt :dedent: 8 - :lines: 31-50 :language: java .. note:: Setting a website configuration does not modify the access permissions for your bucket. @@ -65,15 +63,13 @@ bucket, then :code-java:`null` will be returned. **Imports** -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/GetWebsiteConfiguration.java - :lines: 15-18 +.. literalinclude:: s3.java1.s3_get_website_config.import.txt :language: java **Code** -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/GetWebsiteConfiguration.java +.. literalinclude:: s3.java1.s3_get_website_config.main.txt :dedent: 8 - :lines: 30-46 :language: java See the :sdk-examples-java-s3:`complete example ` on GitHub. @@ -88,15 +84,13 @@ configuration from. **Imports** -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/DeleteWebsiteConfiguration.java - :lines: 15-17 +.. literalinclude:: s3.java1.s3_delete_website_config.import.txt :language: java **Code** -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/DeleteWebsiteConfiguration.java +.. literalinclude:: s3.java1.s3_delete_website_config.main.txt :dedent: 8 - :lines: 29-36 :language: java See the :sdk-examples-java-s3:`complete example ` on GitHub. From 34080457441ffe592038535fdc79734ede397d21 Mon Sep 17 00:00:00 2001 From: Jami Schwarzwalder Date: Wed, 26 Jun 2019 18:15:17 -0700 Subject: [PATCH 045/139] adding missing snippet reference --- doc_source/examples-crypto-masterkey.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc_source/examples-crypto-masterkey.rst b/doc_source/examples-crypto-masterkey.rst index 92c06a7..8e366ba 100644 --- a/doc_source/examples-crypto-masterkey.rst +++ b/doc_source/examples-crypto-masterkey.rst @@ -55,8 +55,7 @@ the :class:`KeyGenerator` Java class generate a symmetric private key. **Code** -.. literalinclude:: example_code/s3/src/main/java/aws/example/s3/S3Encrypt.java - :lines: 198-204 +.. literalinclude:: s3.java1.s3_encrypt.encryption_only.txt :dedent: 8 :language: java From 7eb8bd9ef347c04fdcb4d98543fc7f6e45171243 Mon Sep 17 00:00:00 2001 From: Jami Schwarzwalder Date: Wed, 26 Jun 2019 18:31:34 -0700 Subject: [PATCH 046/139] Change reference to code snippet --- doc_source/examples-crypto-masterkey.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc_source/examples-crypto-masterkey.rst b/doc_source/examples-crypto-masterkey.rst index 8e366ba..bebc77e 100644 --- a/doc_source/examples-crypto-masterkey.rst +++ b/doc_source/examples-crypto-masterkey.rst @@ -109,7 +109,7 @@ To enable this mode, specify the :classname:`AuthenticatedEncryption` value in t **Code** -.. literalinclude:: s3.java1.s3_encrypt.strict_authenticated_encryption_build.txt +.. literalinclude:: s3.java1.s3_encrypt.authenticated_encryption_build.txt :dedent: 8 :language: java @@ -119,7 +119,7 @@ objects encrypted with :classname:`EncryptionOnly` mode. The following example s **Code** -.. literalinclude:: s3.java1.s3_encrypt.strict_authenticated_encryption.txt +.. literalinclude:: s3.java1.s3_encrypt.authenticated_encryption.txt :dedent: 8 :language: java From e9a514c3f71686427f79c31428f5e0f093fdda5a Mon Sep 17 00:00:00 2001 From: Jami Schwarzwalder Date: Tue, 16 Jul 2019 18:33:37 -0700 Subject: [PATCH 047/139] adding snippet references for SWF --- doc_source/swf-graceful-shutdown.rst | 3 +- doc_source/swf-hello.rst | 65 ++++++++++------------------ 2 files changed, 25 insertions(+), 43 deletions(-) diff --git a/doc_source/swf-graceful-shutdown.rst b/doc_source/swf-graceful-shutdown.rst index baa3684..73cf8d3 100644 --- a/doc_source/swf-graceful-shutdown.rst +++ b/doc_source/swf-graceful-shutdown.rst @@ -30,9 +30,8 @@ attempt a graceful shutdown of the activity worker. Here is the complete code: -.. literalinclude:: example_code/swf/src/main/java/aws/example/helloswf/ActivityWorkerWithGracefulShutdown.java +.. literalinclude:: swf.java.activity_worker_with_graceful_shutdown.complete.txt :language: java - :lines: 16- In this version, the polling code that was in the ``main`` function in the original version has been moved into its own method, ``pollAndExecute``. diff --git a/doc_source/swf-hello.rst b/doc_source/swf-hello.rst index 514fabe..1c7b088 100644 --- a/doc_source/swf-hello.rst +++ b/doc_source/swf-hello.rst @@ -185,17 +185,15 @@ interest of time, these steps *will be implied every time you add a new file to #. Add a :code-java:`package` declaration to the beginning of each file to declare its namespace. The example project uses: - .. literalinclude:: example_code/swf/src/main/java/aws/example/helloswf/HelloTypes.java + .. literalinclude:: swf.java.hello_types.package.txt :language: java - :lines: 16 #. Add :code-java:`import` declarations for the :aws-java-class:`AmazonSimpleWorkflowClient ` class and for multiple classes in the ``com.amazonaws.services.simpleworkflow.model`` namespace. To simplify things, we'll use: - .. literalinclude:: example_code/swf/src/main/java/aws/example/helloswf/HelloTypes.java + .. literalinclude:: swf.java.hello_types.import.txt :language: java - :lines: 18-20 .. _swf-hello-hellotypes: @@ -212,9 +210,8 @@ your activity and workflow types, the domain name and the task list name. #. Declare the :classname:`HelloTypes` class and provide it with values to use for your registered activity and workflow types: - .. literalinclude:: example_code/swf/src/main/java/aws/example/helloswf/HelloTypes.java + .. literalinclude:: swf.java.hello_types.string_declare.txt :language: java - :lines: 22-28, 83 These values will be used throughout the code. @@ -222,18 +219,16 @@ your activity and workflow types, the domain name and the task list name. ` class. This is the basic interface to the |SWF| methods provided by the |sdk-java|. - .. literalinclude:: example_code/swf/src/main/java/aws/example/helloswf/HelloTypes.java + .. literalinclude:: swf.java.hello_types.client.txt :language: java - :lines: 30-31 :dedent: 4 #. Add a new function to register a SWF domain. A *domain* is a logical container for a number of related SWF activity and workflow types. SWF components can only communicate with each other if they exist within the same domain. - .. literalinclude:: example_code/swf/src/main/java/aws/example/helloswf/HelloTypes.java + .. literalinclude:: swf.java.hello_types.new_function.txt :language: java - :lines: 33-42 :dedent: 4 When you register a domain, you provide it with a *name* (any set of 1 |ndash| 256 characters @@ -254,9 +249,8 @@ your activity and workflow types, the domain name and the task list name. #. Add a function to register a new activity type. An *activity* represents a unit of work in your workflow. - .. literalinclude:: example_code/swf/src/main/java/aws/example/helloswf/HelloTypes.java + .. literalinclude:: swf.java.hello_types.new_activity_type.txt :language: java - :lines: 44-60 :dedent: 4 An activity type is identified by a *name* and a *version*, which are used to uniquely identify @@ -276,9 +270,8 @@ your activity and workflow types, the domain name and the task list name. #. Add a function to register a new workflow type. A *workflow*, also known as a *decider* represents the logic of your workflow's execution. - .. literalinclude:: example_code/swf/src/main/java/aws/example/helloswf/HelloTypes.java + .. literalinclude:: swf.java.hello_types.new_workflow_type.txt :language: java - :lines: 62-76 :dedent: 4 Similar to activity types, workflow types are identified by a *name* and a *version* and also @@ -292,9 +285,8 @@ your activity and workflow types, the domain name and the task list name. #. Finally, make the class executable by providing it a :code-java:`main` method, which will register the domain, the activity type, and the workflow type in turn: - .. literalinclude:: example_code/swf/src/main/java/aws/example/helloswf/HelloTypes.java + .. literalinclude:: swf.java.hello_types.main.txt :language: java - :lines: 78-82 :dedent: 4 You can :ref:`build ` and :ref:`run ` the application now @@ -319,19 +311,20 @@ We'll implement a simple activity worker that drives a single activity. #. Open your text editor and create the file :file:`ActivityWorker.java`, adding a package declaration and imports according to the :ref:`common steps `. + + .. literalinclude:: swf.java.activity_worker.import.txt + :language: java #. Add the :classname:`ActivityWorker` class to the file, and give it a data member to hold a SWF client that we'll use to interact with |SWF|: - .. literalinclude:: example_code/swf/src/main/java/aws/example/helloswf/ActivityWorker.java + .. literalinclude:: swf.java.activity_worker.client.txt :language: java - :lines: 22-24, 75 #. Add the method that we'll use as an activity: - .. literalinclude:: example_code/swf/src/main/java/aws/example/helloswf/ActivityWorker.java + .. literalinclude:: swf.java.activity_worker.sayHello.txt :language: java - :lines: 26-28 :dedent: 4 The activity simply takes a string, combines it into a greeting and returns the result. Although @@ -341,9 +334,8 @@ We'll implement a simple activity worker that drives a single activity. #. Add a :methodname:`main` method that we'll use as the activity task polling method. We'll start it by adding some code to poll the task list for activity tasks: - .. literalinclude:: example_code/swf/src/main/java/aws/example/helloswf/ActivityWorker.java + .. literalinclude:: swf.java.activity_worker.poll_method.txt :language: java - :lines: 30-42, 74 :dedent: 4 The activity receives tasks from |SWF| by calling the SWF client's @@ -358,10 +350,9 @@ We'll implement a simple activity worker that drives a single activity. :methodname:`main` method, right after the code that polls for the task and retrieves its task token. - .. literalinclude:: example_code/swf/src/main/java/aws/example/helloswf/ActivityWorker.java + .. literalinclude:: swf.java.activity_worker.process_tasks.txt :language: java - :lines: 44-72 - :dedent: 12 + :dedent: 8 If the task token is not :code-java:`null`, then we can start running the activity method (:methodname:`sayHello`), providing it with the input data that was sent with the task. @@ -397,26 +388,23 @@ schedule a new activity or not) and takes an appropriate action (such as schedul #. Add a few additional imports to the file: - .. literalinclude:: example_code/swf/src/main/java/aws/example/helloswf/WorkflowWorker.java + .. literalinclude:: swf.java.workflow_worker.import.txt :language: java - :lines: 21-23 #. Declare the :classname:`WorkflowWorker` class, and create an instance of the :aws-java-class:`AmazonSimpleWorkflowClient ` class used to access SWF methods. - .. literalinclude:: example_code/swf/src/main/java/aws/example/helloswf/WorkflowWorker.java + .. literalinclude:: swf.java.workflow_worker.client.txt :language: java - :lines: 25-27, 139 #. Add the :methodname:`main` method. The method loops continuously, polling for decision tasks using the SWF client's :methodname:`pollForDecisionTask` method. The :aws-java-class:`PollForDecisionTaskRequest ` provides the details. - .. literalinclude:: example_code/swf/src/main/java/aws/example/helloswf/WorkflowWorker.java + .. literalinclude:: swf.java.workflow_worker.main.txt :language: java - :lines: 29-52 :dedent: 4 Once a task is received, we call its :methodname:`getTaskToken` method, which returns a string @@ -428,9 +416,8 @@ schedule a new activity or not) and takes an appropriate action (such as schedul #. Add the :methodname:`executeDecisionTask` method, taking the task token (a :classname:`String`) and the :classname:`HistoryEvent` list. - .. literalinclude:: example_code/swf/src/main/java/aws/example/helloswf/WorkflowWorker.java + .. literalinclude:: swf.java.workflow_worker.execute_decision_task_token.txt :language: java - :lines: 60-67, 138 :dedent: 4 We also set up some data members to keep track of things such as: @@ -447,9 +434,8 @@ schedule a new activity or not) and takes an appropriate action (such as schedul objects that were sent with the task, based on the event type reported by the :methodname:`getEventType` method. - .. literalinclude:: example_code/swf/src/main/java/aws/example/helloswf/WorkflowWorker.java + .. literalinclude:: swf.java.workflow_worker.execute_decision_task_history_events.txt :language: java - :lines: 69-102 :dedent: 8 For the purposes of our workflow, we are most interested in: @@ -480,9 +466,8 @@ schedule a new activity or not) and takes an appropriate action (such as schedul #. After the :code-java:`switch` statement, add more code to respond with an appropriate *decision* based on the task that was received. - .. literalinclude:: example_code/swf/src/main/java/aws/example/helloswf/WorkflowWorker.java + .. literalinclude:: swf.java.workflow_worker.task_decision.txt :language: java - :lines: 104-132 :dedent: 8 * If the activity hasn't been scheduled yet, we respond with a :classname:`ScheduleActivityTask` @@ -505,9 +490,8 @@ schedule a new activity or not) and takes an appropriate action (such as schedul processing the task. Add this code at the end of the :methodname:`executeDecisionTask` method that we've been writing: - .. literalinclude:: example_code/swf/src/main/java/aws/example/helloswf/WorkflowWorker.java + .. literalinclude:: swf.java.workflow_worker.return_decision_objects.txt :language: java - :lines: 134-138 :dedent: 8 The SWF client's :methodname:`respondDecisionTaskCompleted` method takes the task token that @@ -524,9 +508,8 @@ Finally, we'll write some code to start the workflow execution. #. Add the :classname:`WorkflowStarter` class: - .. literalinclude:: example_code/swf/src/main/java/aws/example/helloswf/WorkflowStarter.java + .. literalinclude:: swf.java.workflow_starter.complete.txt :language: java - :lines: 22- The :classname:`WorkflowStarter` class consists of a single method, :methodname:`main`, which takes an optional argument passed on the command-line as input data for the workflow. From 90c03c5461f76ca90dd25b0273a8890bc390d2b4 Mon Sep 17 00:00:00 2001 From: Jami Schwarzwalder Date: Tue, 23 Jul 2019 14:32:39 -0700 Subject: [PATCH 048/139] Matching the package structure to the example. --- doc_source/swf-hello.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc_source/swf-hello.rst b/doc_source/swf-hello.rst index 1c7b088..d087ba9 100644 --- a/doc_source/swf-hello.rst +++ b/doc_source/swf-hello.rst @@ -115,7 +115,7 @@ Create a SWF project .. code-block:: sh mvn archetype:generate -DartifactId=helloswf \ - -DgroupId=example.swf.hello -DinteractiveMode=false + -DgroupId=aws.example.helloswf -DinteractiveMode=false This will create a new project with a standard maven project structure: @@ -126,9 +126,9 @@ Create a SWF project └── src ├── main │   └── java - │   └── example - │   └── swf - │   └── hello + │   └── aws + │   └── example + │   └── helloswf │   └── App.java └── test └── ... From e3353e081b83a81077062946d44bdeea7e1ee251 Mon Sep 17 00:00:00 2001 From: Jami Schwarzwalder Date: Thu, 25 Jul 2019 14:26:40 -0700 Subject: [PATCH 049/139] Edit Pass (#45) * fixing capitalization errors * spelling fix * spelling fix --- doc_source/examples-ec2-regions-zones.rst | 8 ++++---- doc_source/swf-basics.rst | 2 +- doc_source/swf-hello.rst | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc_source/examples-ec2-regions-zones.rst b/doc_source/examples-ec2-regions-zones.rst index 553b0dd..4d93ba1 100644 --- a/doc_source/examples-ec2-regions-zones.rst +++ b/doc_source/examples-ec2-regions-zones.rst @@ -21,11 +21,11 @@ Using Regions and Availability Zones Describing Regions ================== -To list the regions available to your account, call the |ec2client|'s :methodname:`describeRegions` +To list the Regions available to your account, call the |ec2client|'s :methodname:`describeRegions` method. It returns a :aws-java-class:`DescribeRegionsResult `. Call the returned object's :methodname:`getRegions` method to get a list of :aws-java-class:`Region ` objects that represent -each region. +each Region. **Imports** @@ -46,12 +46,12 @@ See the :sdk-examples-java-ec2:`complete example ` Describing Availability Zones ============================= -To list each availability zone available to your account, call the |ec2client|'s +To list each Availability Zone available to your account, call the |ec2client|'s :methodname:`describeAvailabilityZones` method. It returns a :aws-java-class:`DescribeAvailabilityZonesResult `. Call its :methodname:`getAvailabilityZones` method to get a list of :aws-java-class:`AvailabilityZone ` -objects that represent each availability zone. +objects that represent each Availability Zone. **Imports** diff --git a/doc_source/swf-basics.rst b/doc_source/swf-basics.rst index 08cb056..58ed4c9 100644 --- a/doc_source/swf-basics.rst +++ b/doc_source/swf-basics.rst @@ -34,7 +34,7 @@ Basic |SWF| applications will require the following dependencies, which are incl you have, but the versions that are supplied with the SDK have been tested for compatibility, and are the ones you should use. -|jflow| applications require additonal setup, *and* additional dependencies. See the |jflow-dg|_ for +|jflow| applications require additional setup, *and* additional dependencies. See the |jflow-dg|_ for more information about using the framework. Imports diff --git a/doc_source/swf-hello.rst b/doc_source/swf-hello.rst index d087ba9..eff6f5d 100644 --- a/doc_source/swf-hello.rst +++ b/doc_source/swf-hello.rst @@ -200,7 +200,7 @@ interest of time, these steps *will be implied every time you add a new file to Register a domain, workflow and activity types ---------------------------------------------- -We'll begin by creating a new executeable class, :file:`HelloTypes.java`. This file will contain shared +We'll begin by creating a new executable class, :file:`HelloTypes.java`. This file will contain shared data that different parts of your workflow will need to know about, such as the name and version of your activity and workflow types, the domain name and the task list name. From 46810d1524ca20587d1d7ab3f1ee8e457f14251c Mon Sep 17 00:00:00 2001 From: Jami Schwarzwalder Date: Tue, 30 Jul 2019 10:53:15 -0700 Subject: [PATCH 050/139] Fixing spelling mistakes --- doc_source/swf-hello.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_source/swf-hello.rst b/doc_source/swf-hello.rst index eff6f5d..f39befb 100644 --- a/doc_source/swf-hello.rst +++ b/doc_source/swf-hello.rst @@ -580,7 +580,7 @@ applications. java -cp target/helloswf-1.0.jar:/path/to/sdk/lib/*:/path/to/sdk/third-party/lib/* \ example.swf.hello.HelloTypes -The style that you use is up to you. If you had no trouble building the code, buth then try to run +The style that you use is up to you. If you had no trouble building the code, both then try to run the examples and get a series of "NoClassDefFound" errors, it is likely because the classpath is set incorrectly. From 3e4552789317bf16e106f1bee02d53eb00119b19 Mon Sep 17 00:00:00 2001 From: Jami Schwarzwalder Date: Tue, 30 Jul 2019 11:01:11 -0700 Subject: [PATCH 051/139] Cross referencing V2 --- doc_source/prog-services.rst | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/doc_source/prog-services.rst b/doc_source/prog-services.rst index b1bbd18..35f2cc2 100644 --- a/doc_source/prog-services.rst +++ b/doc_source/prog-services.rst @@ -12,7 +12,14 @@ |sdk-java| Code Examples ######################## -This section provides tutorials and examples of using the |sdk-java| to program AWS services. +This section provides tutorials and examples of using the |sdk-java| v1 to program AWS services. + +AWS SDK for Java 2.x +===================== +In 2018, AWS released |sdk-java| v2. For more AWS examples, see the `AWS SDK for Java 2.x Developer Guide`_. + +.. _`aws sdk for java 2.x developer guide`: http://docs.aws.amazon.com/sdk-for-java/v2/developer-guide/welcome.html + .. tip:: See :ref:`additional-resources` for more examples and additional resources available for |sdk-java| developers! From 261d3e76b840e3bcd66a39e6738e7e2e6c2a52fb Mon Sep 17 00:00:00 2001 From: Jami Schwarzwalder Date: Fri, 2 Aug 2019 16:15:45 -0700 Subject: [PATCH 052/139] fixing complete code example to use correct syntax --- doc_source/setup-project-gradle.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_source/setup-project-gradle.rst b/doc_source/setup-project-gradle.rst index 369109d..d8ff42e 100644 --- a/doc_source/setup-project-gradle.rst +++ b/doc_source/setup-project-gradle.rst @@ -59,7 +59,7 @@ Here's the complete :file:`build.gradle` file: } dependencies { - implementation 'com.amazonaws:aws-java-sdk-bom:1.11.228' + implementation platform('com.amazonaws:aws-java-sdk-bom:1.11.228') implementation 'com.amazonaws:aws-java-sdk-s3' testCompile group: 'junit', name: 'junit', version: '4.11' } From 9542a2c7bc45821905e0e65d6d5ea9ffc30b68d9 Mon Sep 17 00:00:00 2001 From: Jami Schwarzwalder Date: Tue, 6 Aug 2019 14:55:32 -0700 Subject: [PATCH 053/139] updating to Spot Instance --- doc_source/tutorial-spot-adv-java.rst | 26 ++++++++++----------- doc_source/tutorial-spot-instances-java.rst | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/doc_source/tutorial-spot-adv-java.rst b/doc_source/tutorial-spot-adv-java.rst index 58b817d..2d8a13a 100644 --- a/doc_source/tutorial-spot-adv-java.rst +++ b/doc_source/tutorial-spot-adv-java.rst @@ -16,9 +16,9 @@ Tutorial: Advanced |EC2| Spot Request Management ################################################ -|EC2| spot instances allow you to bid on unused |EC2| capacity and run those instances for as long +|EC2| Spot Instances allow you to bid on unused |EC2| capacity and run those instances for as long as your bid exceeds the current *spot price*. |EC2| changes the spot price periodically based on -supply and demand. For more information about spot instances, see :ec2-ug:`Spot Instances +supply and demand. For more information about Spot Instances, see :ec2-ug:`Spot Instances ` in the |EC2-ug|. @@ -139,7 +139,7 @@ sample. Note you only need to run this application once to create a new security .. _tutor-spot-adv-req-opts: -Detailed spot instance request creation options +Detailed Spot Instance request creation options =============================================== As we explained in :doc:`tutorial-spot-instances-java`, you need to build your request with an @@ -149,7 +149,7 @@ Let's start by creating a :code:`RequestSpotInstanceRequest` object. The request number of instances you want and the bid price. Additionally, we need to set the :code:`LaunchSpecification` for the request, which includes the instance type, AMI ID, and security group you want to use. After the request is populated, we call the :code:`requestSpotInstances` -method on the :code:`AmazonEC2Client` object. An example of how to request a Spot instance follows. +method on the :code:`AmazonEC2Client` object. An example of how to request a Spot Instance follows. (The following code is the same as what we used in the first tutorial.) @@ -265,13 +265,13 @@ period is shown in the following code. .. _tutor-spot-adv-grouping: -Grouping your |EC2| spot instance requests +Grouping your |EC2| Spot Instance requests ========================================== -You have the option of grouping your Spot instance requests in several different ways. We'll look at +You have the option of grouping your Spot Instance requests in several different ways. We'll look at the benefits of using launch groups, Availability Zone groups, and placement groups. -If you want to ensure your Spot instances are all launched and terminated together, then you have +If you want to ensure your Spot Instances are all launched and terminated together, then you have the option to leverage a launch group. A launch group is a label that groups a set of bids together. All instances in a launch group are started and terminated together. Note, if instances in a launch group have already been fulfilled, there is no guarantee that new instances launched with the same @@ -396,7 +396,7 @@ example shows you how to set an Availability Zone. ec2.requestSpotInstances(requestRequest); Lastly, you can specify a :emphasis:`placement group` if you are using High Performance Computing -(HPC) Spot instances, such as cluster compute instances or cluster GPU instances. Placement groups +(HPC) Spot Instances, such as cluster compute instances or cluster GPU instances. Placement groups provide you with lower latency and high-bandwidth connectivity between the instances. An example of how to set a placement group follows. @@ -452,7 +452,7 @@ class. How to persist a root partition after interruption or termination ================================================================= -One of the easiest ways to manage interruption of your Spot instances is to ensure that your data is +One of the easiest ways to manage interruption of your Spot Instances is to ensure that your data is checkpointed to an |EBSlong| (|EBS|) volume on a regular cadence. By checkpointing periodically, if there is an interruption you will lose only the data created since the last checkpoint (assuming no other non-idempotent actions are performed in between). To make this process easier, you can @@ -528,7 +528,7 @@ that we include in the launch specification. Assuming you wanted to re-attach this volume to your instance on startup, you can also use the block device mapping settings. Alternatively, if you attached a non-root partition, you can specify the -Amazon EBS volumes you want to attach to your Spot instance after it resumes. You do this simply by +Amazon EBS volumes you want to attach to your Spot Instance after it resumes. You do this simply by specifying a snapshot ID in your :code:`EbsBlockDevice` and alternative device name in your :code:`BlockDeviceMapping` objects. By leveraging block device mappings, it can be easier to bootstrap your instance. @@ -605,7 +605,7 @@ Canceling spot requests and terminating instances Canceling a spot request ------------------------ -To cancel a spot instance request, call :methodname:`cancelSpotInstanceRequests` on the EC2 client +To cancel a Spot Instance request, call :methodname:`cancelSpotInstanceRequests` on the EC2 client with a :aws-java-class:`CancelSpotInstanceRequestsRequest ` object. @@ -613,10 +613,10 @@ with a :aws-java-class:`CancelSpotInstanceRequestsRequest :lines: 18-27 :language: java -Terminating spot instances +Terminating Spot Instances -------------------------- -You can terminate any spot instances that are running by passing their IDs to the EC2 client's +You can terminate any Spot Instances that are running by passing their IDs to the EC2 client's :methodname:`terminateInstances()` method. .. literalinclude:: snippets/ec2/cancel-terminate-spot-request.java diff --git a/doc_source/tutorial-spot-instances-java.rst b/doc_source/tutorial-spot-instances-java.rst index 71341ec..936607a 100644 --- a/doc_source/tutorial-spot-instances-java.rst +++ b/doc_source/tutorial-spot-instances-java.rst @@ -188,7 +188,7 @@ always determine the latest version AMI by following these steps: Alternatively, you can use the :code:`DescribeImages` API, but leveraging that command is outside the scope of this tutorial. -There are many ways to approach bidding for Spot instances; to get a broad overview of the various +There are many ways to approach bidding for Spot Instances; to get a broad overview of the various approaches you should view the `Bidding for Spot Instances `_ video. However, to get started, we'll describe three common strategies: bid to ensure cost is less than on-demand pricing; From 4fb3ab0146aa59aa9420455fccb7bc7d94e89800 Mon Sep 17 00:00:00 2001 From: Jami Schwarzwalder Date: Wed, 7 Aug 2019 17:20:35 -0700 Subject: [PATCH 054/139] Updating information about Spot Instances --- doc_source/tutorial-spot-instances-java.rst | 23 ++++++++++++--------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/doc_source/tutorial-spot-instances-java.rst b/doc_source/tutorial-spot-instances-java.rst index 936607a..937f6d3 100644 --- a/doc_source/tutorial-spot-instances-java.rst +++ b/doc_source/tutorial-spot-instances-java.rst @@ -17,11 +17,11 @@ Tutorial: |EC2| Spot Instances Overview ======== -Spot Instances allow you to bid on unused |EC2long| (|EC2|) capacity and run the acquired instances -for as long as your bid exceeds the current :emphasis:`Spot Price`. |EC2| changes the Spot Price -periodically based on supply and demand, and customers whose bids meet or exceed it gain access to -the available Spot Instances. Like On-Demand Instances and Reserved Instances, Spot Instances -provide you another option for obtaining more compute capacity. +Spot Instances enable you to bid on unused |EC2long| (|EC2|) capacity t up to 90% versus the On-Demand +Instance price and run the acquired instances for as long as your bid exceeds the current +:emphasis:`Spot Price`. |EC2| changes the Spot Price periodically based on supply and demand, and customers +whose bids meet or exceed it gain access to the available Spot Instances. Like On-Demand Instances and +Reserved Instances, Spot Instances provide you another option for obtaining more compute capacity. Spot Instances can significantly lower your |EC2| costs for batch processing, scientific research, image processing, video encoding, data and web crawling, financial analysis, and testing. @@ -207,10 +207,10 @@ quickly as possible. On-Demand price), anticipating that your one-time Spot request would most likely be fulfilled and run for enough consecutive compute time to complete the job. - * Or, you could bid at the lower end of the price range, and plan to combine many instances - launched over time through a persistent request. The instances would run long enough--in - aggregate--to complete the job at an even lower total cost. (We will explain how to automate - this task later in this tutorial.) + * Or, you could specify the amount you are willing to pay for Spot Instances as a % of the On-Demand Instance price + , and plan to combine many instances launched over time through a persistent request. If the specified + price is exceeded, then the Spot Instance will terminate. (We will explain how to automate this task + later in this tutorial.) * :emphasis:`Pay No More than the Value of the Result` You have a data processing job to run. You understand the value of the job's results well enough to know how much they are worth in terms @@ -228,7 +228,10 @@ quickly as possible. After you choose your bid price, you are ready to request a Spot Instance. For the purposes of this tutorial, we will bid the On-Demand price ($0.03) to maximize the chances that the bid will be fulfilled. You can determine the types of available instances and the On-Demand prices for instances -by going to Amazon EC2 Pricing page. To request a Spot Instance, you simply need to build your +by going to Amazon EC2 Pricing page. While a Spot Instancee is running, you pay the Spot price that's in effect for +the time period your instances are running. Spot Instance prices are set by Amazon EC2 and adjust gradually based +on long-term trends in supply and demand for Spot Instance capacity. You can also specify the amount you are willing +to pay for a Spot Instance as a % of the On-Demand Instance price.To request a Spot Instance, you simply need to build your request with the parameters you chose earlier. We start by creating a :code:`RequestSpotInstanceRequest` object. The request object requires the number of instances you want to start and the bid price. Additionally, you need to set the :code:`LaunchSpecification` for From 8741c5b0936e70d455f36628afb30a8219da669f Mon Sep 17 00:00:00 2001 From: Paul Cornell Date: Thu, 26 Sep 2019 14:49:06 +0000 Subject: [PATCH 055/139] Periodic update 2019-09-26 07:48 PDT. --- .../examples-pinpoint-update-channel.rst | 2 +- doc_source/examples-s3-buckets.rst | 21 +++++++++---------- doc_source/prog-services-sts.rst | 4 ++-- doc_source/prog-services.rst | 7 +++++++ doc_source/welcome.rst | 2 ++ 5 files changed, 22 insertions(+), 14 deletions(-) diff --git a/doc_source/examples-pinpoint-update-channel.rst b/doc_source/examples-pinpoint-update-channel.rst index 31f1a0a..c27a545 100644 --- a/doc_source/examples-pinpoint-update-channel.rst +++ b/doc_source/examples-pinpoint-update-channel.rst @@ -42,7 +42,7 @@ and pass that object to the :dedent: 2 :language: java -See the :sdk-examples-java-pinpoint:`complete example ` on GitHub. +See the :sdk-examples-java-pinpoint:`complete example ` on GitHub. More Information diff --git a/doc_source/examples-s3-buckets.rst b/doc_source/examples-s3-buckets.rst index e16efb0..ac21b01 100644 --- a/doc_source/examples-s3-buckets.rst +++ b/doc_source/examples-s3-buckets.rst @@ -42,13 +42,13 @@ exception if the bucket already exists. **Imports** .. literalinclude:: example_code/s3/src/main/java/aws/example/s3/CreateBucket.java - :lines: 15-19 + :lines: 26-32 :language: java **Code** .. literalinclude:: example_code/s3/src/main/java/aws/example/s3/CreateBucket.java - :lines: 42-54 + :lines: 54-66 :dedent: 8 :language: java @@ -66,13 +66,13 @@ Use the |s3client| client's :methodname:`listBucket` method. If successful, a li **Imports** .. literalinclude:: example_code/s3/src/main/java/aws/example/s3/ListBuckets.java - :lines: 15-19 + :lines: 26-31 :language: java **Code** .. literalinclude:: example_code/s3/src/main/java/aws/example/s3/ListBuckets.java - :lines: 30-36 + :lines: 41-46 :dedent: 8 :language: java @@ -104,13 +104,13 @@ delete each one. **Imports** .. literalinclude:: example_code/s3/src/main/java/aws/example/s3/DeleteBucket.java - :lines: 15-17, 19-20, 23 + :lines: 26-32 :language: java **Code** .. literalinclude:: example_code/s3/src/main/java/aws/example/s3/DeleteBucket.java - :lines: 51, 53-70, 94-97 + :lines: 61-80 :dedent: 8 :language: java @@ -130,19 +130,18 @@ objects, and then :methodname:`deleteVersion` to delete each one. **Imports** .. literalinclude:: example_code/s3/src/main/java/aws/example/s3/DeleteBucket.java - :lines: 15-23 + :lines: 26-32 :language: java **Code** .. literalinclude:: example_code/s3/src/main/java/aws/example/s3/DeleteBucket.java - :lines: 51, 53-90, 94-97 + :lines: 78-96 :dedent: 8 :language: java See the :sdk-examples-java-s3:`complete example ` on GitHub. - Delete an Empty Bucket ---------------------- @@ -152,13 +151,13 @@ bucket itself by using the |s3client| client's :methodname:`deleteBucket` method **Imports** .. literalinclude:: example_code/s3/src/main/java/aws/example/s3/DeleteBucket.java - :lines: 15-17 + :lines: 26-32 :language: java **Code** .. literalinclude:: example_code/s3/src/main/java/aws/example/s3/DeleteBucket.java - :lines: 51, 53, 93-97 + :lines: 98-104 :dedent: 8 :language: java diff --git a/doc_source/prog-services-sts.rst b/doc_source/prog-services-sts.rst index 666f305..bbf4721 100644 --- a/doc_source/prog-services-sts.rst +++ b/doc_source/prog-services-sts.rst @@ -66,9 +66,9 @@ Retrieve temporary security credentials from |STS| .. code-block:: java - AWSSecurityTokenServiceClient sts_client = new AWSSecurityTokenServiceClientBuilder().standard().build(); + AWSSecurityTokenService sts_client = new AWSSecurityTokenServiceClientBuilder().standard().withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration("sts-endpoint.amazonaws.com", "signing-region")).build() - When creating the client with no arguments, the default credential provider chain is used to + When creating the client with no arguments (:code:`AWSSecurityTokenServiceClient sts_client = new AWSSecurityTokenServiceClientBuilder().standard().build();`), the default credential provider chain is used to retrieve credentials. You can provide a specific credential provider if you want. For more information, see Providing AWS Credentials in the AWS SDK for Java. diff --git a/doc_source/prog-services.rst b/doc_source/prog-services.rst index 35f2cc2..e623982 100644 --- a/doc_source/prog-services.rst +++ b/doc_source/prog-services.rst @@ -14,6 +14,13 @@ This section provides tutorials and examples of using the |sdk-java| v1 to program AWS services. +Find the source code for these examples and others in the AWS documentation `code examples repository on GitHub `_. + +To propose a new code example for the AWS documentation team to consider producing, create a new request. +The team is looking to produce code examples that cover broader scenarios and use cases, +versus simple code snippets that cover only individual API calls. For instructions, +see the "Proposing new code examples" section in the `Readme on GitHub `_. + AWS SDK for Java 2.x ===================== In 2018, AWS released |sdk-java| v2. For more AWS examples, see the `AWS SDK for Java 2.x Developer Guide`_. diff --git a/doc_source/welcome.rst b/doc_source/welcome.rst index 228a93d..e4215e5 100644 --- a/doc_source/welcome.rst +++ b/doc_source/welcome.rst @@ -58,6 +58,8 @@ developers: + `Gitter channel `_ +* The `AWS Code Sample Catalog `_ + * `@awsforjava (Twitter) `_ * `release notes `_ From 90909b331e80bbdd5f5180efbc2de1c268652e16 Mon Sep 17 00:00:00 2001 From: Paul Cornell Date: Thu, 26 Sep 2019 15:25:54 +0000 Subject: [PATCH 056/139] Periodic update 08:25 PDT. --- doc_source/examples-s3-buckets.rst | 28 ++++++++++----------- doc_source/sdk-metrics.rst | 2 -- doc_source/setup-project-gradle.rst | 2 +- doc_source/tutorial-spot-instances-java.rst | 6 ++--- 4 files changed, 17 insertions(+), 21 deletions(-) diff --git a/doc_source/examples-s3-buckets.rst b/doc_source/examples-s3-buckets.rst index ac21b01..91afff7 100644 --- a/doc_source/examples-s3-buckets.rst +++ b/doc_source/examples-s3-buckets.rst @@ -42,19 +42,18 @@ exception if the bucket already exists. **Imports** .. literalinclude:: example_code/s3/src/main/java/aws/example/s3/CreateBucket.java - :lines: 26-32 + :lines: 16-22 :language: java **Code** .. literalinclude:: example_code/s3/src/main/java/aws/example/s3/CreateBucket.java - :lines: 54-66 + :lines: 46-56 :dedent: 8 :language: java See the :sdk-examples-java-s3:`complete example ` on GitHub. - .. _list-buckets: List Buckets @@ -66,19 +65,18 @@ Use the |s3client| client's :methodname:`listBucket` method. If successful, a li **Imports** .. literalinclude:: example_code/s3/src/main/java/aws/example/s3/ListBuckets.java - :lines: 26-31 + :lines: 16-21 :language: java **Code** .. literalinclude:: example_code/s3/src/main/java/aws/example/s3/ListBuckets.java - :lines: 41-46 + :lines: 32-36 :dedent: 8 :language: java See the :sdk-examples-java-s3:`complete example ` on GitHub. - .. _delete-bucket: Delete a Bucket @@ -104,14 +102,14 @@ delete each one. **Imports** .. literalinclude:: example_code/s3/src/main/java/aws/example/s3/DeleteBucket.java - :lines: 26-32 + :lines: 16-22 :language: java **Code** .. literalinclude:: example_code/s3/src/main/java/aws/example/s3/DeleteBucket.java - :lines: 61-80 - :dedent: 8 + :lines: 50-66 + :dedent: 12 :language: java See the :sdk-examples-java-s3:`complete example ` on GitHub. @@ -130,14 +128,14 @@ objects, and then :methodname:`deleteVersion` to delete each one. **Imports** .. literalinclude:: example_code/s3/src/main/java/aws/example/s3/DeleteBucket.java - :lines: 26-32 + :lines: 16-22 :language: java **Code** .. literalinclude:: example_code/s3/src/main/java/aws/example/s3/DeleteBucket.java - :lines: 78-96 - :dedent: 8 + :lines: 68-86 + :dedent: 12 :language: java See the :sdk-examples-java-s3:`complete example ` on GitHub. @@ -151,14 +149,14 @@ bucket itself by using the |s3client| client's :methodname:`deleteBucket` method **Imports** .. literalinclude:: example_code/s3/src/main/java/aws/example/s3/DeleteBucket.java - :lines: 26-32 + :lines: 16-22 :language: java **Code** .. literalinclude:: example_code/s3/src/main/java/aws/example/s3/DeleteBucket.java - :lines: 98-104 - :dedent: 8 + :lines: 88-89 + :dedent: 12 :language: java See the :sdk-examples-java-s3:`complete example ` on GitHub. diff --git a/doc_source/sdk-metrics.rst b/doc_source/sdk-metrics.rst index 721e8bb..66df031 100755 --- a/doc_source/sdk-metrics.rst +++ b/doc_source/sdk-metrics.rst @@ -10,8 +10,6 @@ .. |language| replace:: Java .. |sdk| replace:: |sdk-java| -.. |SDKM| replace:: SDK Metrics -.. |SDKMlong| replace:: AWS SDK Metrics for Enterprise Support #################### Enabling |SDKMlong| diff --git a/doc_source/setup-project-gradle.rst b/doc_source/setup-project-gradle.rst index d8ff42e..a4a6912 100644 --- a/doc_source/setup-project-gradle.rst +++ b/doc_source/setup-project-gradle.rst @@ -12,7 +12,7 @@ Using the SDK with Gradle ######################### -`Since Gradle_ 4.6`_ it is possible to +`Since Gradle 4.6 `_ it is possible to use Gradle's improved POM support feature for importing bill of materials (BOM) files by simply declaring a dependency on a BOM. .. topic:: To configure the SDK for Gradle 4.6 and upper diff --git a/doc_source/tutorial-spot-instances-java.rst b/doc_source/tutorial-spot-instances-java.rst index 937f6d3..31d9ea5 100644 --- a/doc_source/tutorial-spot-instances-java.rst +++ b/doc_source/tutorial-spot-instances-java.rst @@ -208,9 +208,9 @@ quickly as possible. fulfilled and run for enough consecutive compute time to complete the job. * Or, you could specify the amount you are willing to pay for Spot Instances as a % of the On-Demand Instance price - , and plan to combine many instances launched over time through a persistent request. If the specified - price is exceeded, then the Spot Instance will terminate. (We will explain how to automate this task - later in this tutorial.) + , and plan to combine many instances launched over time through a persistent request. If the specified + price is exceeded, then the Spot Instance will terminate. (We will explain how to automate this task + later in this tutorial.) * :emphasis:`Pay No More than the Value of the Result` You have a data processing job to run. You understand the value of the job's results well enough to know how much they are worth in terms From b5a353d2aa8d4ffe54629ed0a033615e93d3c916 Mon Sep 17 00:00:00 2001 From: scmacdon Date: Thu, 21 Nov 2019 12:29:55 -0500 Subject: [PATCH 057/139] fixed indent in example --- doc_source/examples-crypto-masterkey.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_source/examples-crypto-masterkey.rst b/doc_source/examples-crypto-masterkey.rst index bebc77e..77b015c 100644 --- a/doc_source/examples-crypto-masterkey.rst +++ b/doc_source/examples-crypto-masterkey.rst @@ -56,7 +56,7 @@ the :class:`KeyGenerator` Java class generate a symmetric private key. **Code** .. literalinclude:: s3.java1.s3_encrypt.encryption_only.txt - :dedent: 8 + :dedent: 4 :language: java To use an asymmetric key or a key pair, simply pass the key pair to the same From 4ff91d9ba6ad337bed11bab9d8a82fd9aea85db6 Mon Sep 17 00:00:00 2001 From: scmacdon Date: Thu, 21 Nov 2019 14:46:04 -0500 Subject: [PATCH 058/139] fixed indent in example --- doc_source/examples-crypto-masterkey.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc_source/examples-crypto-masterkey.rst b/doc_source/examples-crypto-masterkey.rst index 77b015c..5ae4458 100644 --- a/doc_source/examples-crypto-masterkey.rst +++ b/doc_source/examples-crypto-masterkey.rst @@ -120,7 +120,7 @@ objects encrypted with :classname:`EncryptionOnly` mode. The following example s **Code** .. literalinclude:: s3.java1.s3_encrypt.authenticated_encryption.txt - :dedent: 8 + :dedent: 4 :language: java See the :sdk-examples-java-s3:`complete example ` on GitHub. @@ -150,7 +150,7 @@ authenticated mode. **Code** .. literalinclude:: s3.java1.s3_encrypt.strict_authenticated_encryption.txt - :dedent: 8 + :dedent: 4 :language: java See the :sdk-examples-java-s3:`complete example ` on GitHub. From 97c509908693a1584f0e11c08d80c46bb7c12342 Mon Sep 17 00:00:00 2001 From: scmacdon Date: Fri, 22 Nov 2019 10:17:38 -0500 Subject: [PATCH 059/139] added POM depend tip --- doc_source/setup-project-maven.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc_source/setup-project-maven.rst b/doc_source/setup-project-maven.rst index d71d415..e976f37 100644 --- a/doc_source/setup-project-maven.rst +++ b/doc_source/setup-project-maven.rst @@ -130,6 +130,8 @@ declare it in your :file:`pom.xml` like this: +.. tip:: You can refer to the AWS Code Catalog to learn what dependencies to use for a given AWS service. Refer to the POM file under a specific service example. +For example, if you are interested in the dependencies for the AWS S3 service, see the :sdk-examples-java-s3:`complete example ` on GitHub. (Look at the pom under /java/example_code/s3). Build your project ================== From 8b315f06d0735ea0cf23c553d6690a29f4618834 Mon Sep 17 00:00:00 2001 From: scmacdon Date: Fri, 22 Nov 2019 10:29:44 -0500 Subject: [PATCH 060/139] added POM depend tip --- doc_source/setup-project-maven.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc_source/setup-project-maven.rst b/doc_source/setup-project-maven.rst index e976f37..fe8d041 100644 --- a/doc_source/setup-project-maven.rst +++ b/doc_source/setup-project-maven.rst @@ -111,6 +111,8 @@ component. +.. tip:: You can also refer to the AWS Code Catalog to learn what dependencies to use for a given AWS service. Refer to the POM file under a specific service example. +For example, if you are interested in the dependencies for the AWS S3 service, see the :sdk-examples-java-s3:`complete example ` on GitHub. (Look at the pom under /java/example_code/s3). .. _configuring-maven-entire-sdk: @@ -130,8 +132,6 @@ declare it in your :file:`pom.xml` like this: -.. tip:: You can refer to the AWS Code Catalog to learn what dependencies to use for a given AWS service. Refer to the POM file under a specific service example. -For example, if you are interested in the dependencies for the AWS S3 service, see the :sdk-examples-java-s3:`complete example ` on GitHub. (Look at the pom under /java/example_code/s3). Build your project ================== From 385258d9243fb4807bf78a8623df23abdf8d722c Mon Sep 17 00:00:00 2001 From: scmacdon Date: Fri, 22 Nov 2019 10:56:35 -0500 Subject: [PATCH 061/139] added POM depend tip --- doc_source/setup-project-maven.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_source/setup-project-maven.rst b/doc_source/setup-project-maven.rst index fe8d041..8fadd1d 100644 --- a/doc_source/setup-project-maven.rst +++ b/doc_source/setup-project-maven.rst @@ -111,7 +111,7 @@ component. -.. tip:: You can also refer to the AWS Code Catalog to learn what dependencies to use for a given AWS service. Refer to the POM file under a specific service example. +You can also refer to the *AWS Code Catalog* to learn what dependencies to use for a given AWS service. Refer to the POM file under a specific service example. For example, if you are interested in the dependencies for the AWS S3 service, see the :sdk-examples-java-s3:`complete example ` on GitHub. (Look at the pom under /java/example_code/s3). .. _configuring-maven-entire-sdk: From 92faee23d3cfe6b5c51b0b77cb67610891af5f3b Mon Sep 17 00:00:00 2001 From: scmacdon Date: Fri, 22 Nov 2019 11:52:58 -0500 Subject: [PATCH 062/139] updated cred info --- doc_source/credentials.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc_source/credentials.rst b/doc_source/credentials.rst index 291a869..50fbede 100644 --- a/doc_source/credentials.rst +++ b/doc_source/credentials.rst @@ -59,10 +59,10 @@ class. The default credential provider chain looks for credentials in this order #. **Amazon ECS container credentials** |ndash| loaded from the |ECS| if the environment variable :envvar:`AWS_CONTAINER_CREDENTIALS_RELATIVE_URI` is set. The |sdk-java| uses the :aws-java-class:`ContainerCredentialsProvider ` to load these - credentials. + credentials. You can specify the IP address for this value. #. **Instance profile credentials** |ndash| used on EC2 instances, and delivered through the |EC2| metadata service. The |sdk-java| uses the :aws-java-class:`InstanceProfileCredentialsProvider - ` to load these credentials. + ` to load these credentials. You can specify the IP address for this value. .. note:: Instance profile credentials are used only if :envvar:`AWS_CONTAINER_CREDENTIALS_RELATIVE_URI` is not set. See From 685bc98e30a4f713f3205ef986fddebbd4edc9d7 Mon Sep 17 00:00:00 2001 From: scmacdon Date: Fri, 22 Nov 2019 12:18:57 -0500 Subject: [PATCH 063/139] updated depen info --- doc_source/setup-project-gradle.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc_source/setup-project-gradle.rst b/doc_source/setup-project-gradle.rst index a4a6912..9a68542 100644 --- a/doc_source/setup-project-gradle.rst +++ b/doc_source/setup-project-gradle.rst @@ -43,6 +43,9 @@ use Gradle's improved POM support feature for importing bill of materials (BOM) Gradle will automatically resolve the correct version of your SDK dependencies using the information from the BOM. +You can also refer to the *AWS Code Catalog* to learn what dependencies to use for a given AWS service. Refer to the POM file under a specific service example. +For example, if you are interested in the dependencies for the AWS S3 service, see the :sdk-examples-java-s3:`complete example ` on GitHub. (Look at the pom under /java/example_code/s3). + Here's the complete :file:`build.gradle` file: .. code-block:: groovy From aa6ff9d75d7b4261cda423c902569927735af37a Mon Sep 17 00:00:00 2001 From: scmacdon Date: Fri, 22 Nov 2019 12:43:15 -0500 Subject: [PATCH 064/139] updated depen info --- doc_source/setup-project-gradle.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_source/setup-project-gradle.rst b/doc_source/setup-project-gradle.rst index 9a68542..1f36d79 100644 --- a/doc_source/setup-project-gradle.rst +++ b/doc_source/setup-project-gradle.rst @@ -44,7 +44,7 @@ Gradle will automatically resolve the correct version of your SDK dependencies u from the BOM. You can also refer to the *AWS Code Catalog* to learn what dependencies to use for a given AWS service. Refer to the POM file under a specific service example. -For example, if you are interested in the dependencies for the AWS S3 service, see the :sdk-examples-java-s3:`complete example ` on GitHub. (Look at the pom under /java/example_code/s3). +For example, if you are interested in the dependencies for the AWS S3 service (as shown in the previous dependencies example), see the :sdk-examples-java-s3:`complete example ` on GitHub. (Look at the pom under /java/example_code/s3). Here's the complete :file:`build.gradle` file: From 563a6604c37f6eac2e9b912647d8492abdecc365 Mon Sep 17 00:00:00 2001 From: scmacdon Date: Thu, 28 Nov 2019 14:29:04 -0500 Subject: [PATCH 065/139] new file --- doc_source/examples-s3-objects.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_source/examples-s3-objects.rst b/doc_source/examples-s3-objects.rst index e2dcc22..b37ed54 100644 --- a/doc_source/examples-s3-objects.rst +++ b/doc_source/examples-s3-objects.rst @@ -132,7 +132,7 @@ and the destination bucket and name. **Code** .. literalinclude:: example_code/s3/src/main/java/aws/example/s3/CopyObject.java - :lines: 46-52 + :lines: 50-63 :dedent: 8 :language: java From 66269f4c054f6e6c77afb3d7507e10e97b621385 Mon Sep 17 00:00:00 2001 From: scmacdon Date: Thu, 28 Nov 2019 14:41:39 -0500 Subject: [PATCH 066/139] new file --- doc_source/examples-s3-objects.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc_source/examples-s3-objects.rst b/doc_source/examples-s3-objects.rst index b37ed54..2cff970 100644 --- a/doc_source/examples-s3-objects.rst +++ b/doc_source/examples-s3-objects.rst @@ -121,7 +121,7 @@ Copy, Move, or Rename Objects You can copy an object from one bucket to another by using the |s3client| client's :methodname:`copyObject` method. It takes the name of the bucket to copy from, the object to copy, -and the destination bucket and name. +and the destination bucket name. **Imports** @@ -132,7 +132,7 @@ and the destination bucket and name. **Code** .. literalinclude:: example_code/s3/src/main/java/aws/example/s3/CopyObject.java - :lines: 50-63 + :lines: 48-64 :dedent: 8 :language: java From 8b735c1d65c7f6f91d416406cf05c876495d7d08 Mon Sep 17 00:00:00 2001 From: scmacdon Date: Fri, 29 Nov 2019 10:03:47 -0500 Subject: [PATCH 067/139] modified code lines --- doc_source/examples-s3-bucket-policies.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_source/examples-s3-bucket-policies.rst b/doc_source/examples-s3-bucket-policies.rst index d6335a1..f8b8e0c 100644 --- a/doc_source/examples-s3-bucket-policies.rst +++ b/doc_source/examples-s3-bucket-policies.rst @@ -41,7 +41,7 @@ You can set the bucket policy for a particular S3 bucket by: .. literalinclude:: example_code/s3/src/main/java/aws/example/s3/SetBucketPolicy.java :dedent: 8 - :lines: 81-88 + :lines: 81-86 :language: java From b809ecbe519a4e3670fd1a3af8a29ce4977e1993 Mon Sep 17 00:00:00 2001 From: scmacdon Date: Tue, 3 Dec 2019 08:46:07 -0500 Subject: [PATCH 068/139] added new section --- doc_source/prog-services.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc_source/prog-services.rst b/doc_source/prog-services.rst index e623982..722f3c5 100644 --- a/doc_source/prog-services.rst +++ b/doc_source/prog-services.rst @@ -40,6 +40,7 @@ In 2018, AWS released |sdk-java| v2. For more AWS examples, see the `AWS SDK for Amazon DynamoDB Examples Amazon EC2 Examples AWS Identity and Access Management (IAM) Examples + Amazon Lambda Examples Amazon Pinpoint Examples Amazon S3 Examples Amazon SQS Examples From 8079902e9d43f863c4143e9e5cc98a02e37ea1cb Mon Sep 17 00:00:00 2001 From: scmacdon <57190223+scmacdon@users.noreply.github.com> Date: Tue, 3 Dec 2019 08:48:22 -0500 Subject: [PATCH 069/139] Create examples-lambda.rst --- doc_source/examples-lambda.rst | 106 +++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 doc_source/examples-lambda.rst diff --git a/doc_source/examples-lambda.rst b/doc_source/examples-lambda.rst new file mode 100644 index 0000000..d909c94 --- /dev/null +++ b/doc_source/examples-lambda.rst @@ -0,0 +1,106 @@ +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 + International License (the "License"). You may not use this file except in compliance with the + License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. + + This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + either express or implied. See the License for the specific language governing permissions and + limitations under the License. + +################################################# +Invoking, Listing, and Deleting Lambda Functions +################################################# + +.. meta:: + :description: How to invoke, list, and delete a Lambda function by using the AWS SDK for Java 2.x. + :keywords: Amazon Lambda, AWS SDK for Java 2.x, Lambda code examples, + deleteFunction, invoke, listFunctions + + +This section provides examples of programming with the Lambda service client by using the AWS SDK for Java. + +.. contents:: + :local: + :depth: 1 + +.. _invoke-function: +Invoke a Lambda function +======================== + +You can invoke a Lambda function by creating a :aws-java-class:`LambdaClient ` +object and invoking its :methodname:`invoke` method. Create an :aws-java-class:`InvokeRequest ` +object to specify additional information such as the function name and the payload to pass to the Lambda function. Function names +appear as *arn:aws:lambda:us-west-2:555556330391:function:HelloFunction*. You can retrieve the value by looking at the function in the AWS Console. + +To pass payload data to a function, create a :aws-java-class:`SdkBytes ` +object that contains information. For example, in the following code example, notice the JSON data passed to the Lambda function. + +**Imports** + +.. literalinclude:: s3.java2.s3_object_operations.import.txt + :language: java + +**Code** + +The following code example demonstrates how to invoke a Lambda function. + +.. literalinclude:: s3.java2.s3_object_operations.upload.txt + :language: java + +See the :sdk-examples-java-s3:`complete example ` on GitHub. + + +.. _list-function: + +List Lambda functions +========================= + +Build a :aws-java-class:`LambdaClient ` +object and invoke its :methodname:`listFunctions` method. +This method returns a :aws-java-class:`ListFunctionsResponse ` object. +You can invoke this object's :methodname:`functions` method to return a list of :aws-java-class:`FunctionConfiguration ` objects. +You can iterate through the list to retrieve information about the functions. For example, the following Java code example shows how to get each function name. + + +**Imports** + +.. literalinclude:: s3.java2.s3_object_operations.import.txt + :language: java + +**Code** + +The following Java code example demonstrates how to retrieve a list of function names. + +.. literalinclude:: s3.java2.s3_object_operations.upload.txt + :language: java + +See the :sdk-examples-java-s3:`complete example ` on GitHub. + + +.. _delete-function: + +Delete a Lambda function +======================== + +Build a :aws-java-class:`LambdaClient ` +object and invoke its :methodname:`deleteFunction` method. +Create a :aws-java-class:`DeleteFunctionRequest ` +object and pass it to the :methodname:`deleteFunction` method. This object contains information such as the name of the function to delete. +Function names appear as *arn:aws:lambda:us-west-2:555556330391:function:HelloFunction*. You can retrieve the value by looking at the function in the AWS Console. + +**Imports** + +.. literalinclude:: s3.java2.s3_object_operations.import.txt + :language: java + +**Code** + +The following Java code demonstrates how to delete a Lambda function. + +.. literalinclude:: s3.java2.s3_object_operations.upload.txt + :language: java + +See the :sdk-examples-java-s3:`complete example ` on GitHub. + + From 636965f51373aab4664d019518bf759a5013937b Mon Sep 17 00:00:00 2001 From: scmacdon <57190223+scmacdon@users.noreply.github.com> Date: Tue, 3 Dec 2019 08:49:17 -0500 Subject: [PATCH 070/139] Create lambda-examples.rst --- doc_source/lambda-examples.rst | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 doc_source/lambda-examples.rst diff --git a/doc_source/lambda-examples.rst b/doc_source/lambda-examples.rst new file mode 100644 index 0000000..d0cdacf --- /dev/null +++ b/doc_source/lambda-examples.rst @@ -0,0 +1,28 @@ +.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 + International License (the "License"). You may not use this file except in compliance with the + License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. + + This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + either express or implied. See the License for the specific language governing permissions and + limitations under the License. + +########################################## +Lambda Examples Using the |sdk-java| +########################################## + +.. meta:: + :description: Programming Amazon Lambda using the AWS SDK for Java 2.x + :keywords: AWS SDK for Java code examples + +This section provides examples of programming Lambda using the |sdk-java-v2|. + +.. include:: includes/complete-examples-note.txt + +.. toctree:: + :titlesonly: + :maxdepth: 1 + + Service Operations + From c5078e8f1f1124d41cd307a49a6d525949ea6503 Mon Sep 17 00:00:00 2001 From: scmacdon Date: Tue, 3 Dec 2019 10:43:04 -0500 Subject: [PATCH 071/139] added new section --- doc_source/examples-lambda.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc_source/examples-lambda.rst b/doc_source/examples-lambda.rst index d909c94..516273d 100644 --- a/doc_source/examples-lambda.rst +++ b/doc_source/examples-lambda.rst @@ -26,15 +26,15 @@ This section provides examples of programming with the Lambda service client by .. _invoke-function: Invoke a Lambda function -======================== +======================== -You can invoke a Lambda function by creating a :aws-java-class:`LambdaClient ` +You can invoke a Lambda function by creating a :aws-java-class:`AWSLambda ` object and invoking its :methodname:`invoke` method. Create an :aws-java-class:`InvokeRequest ` object to specify additional information such as the function name and the payload to pass to the Lambda function. Function names appear as *arn:aws:lambda:us-west-2:555556330391:function:HelloFunction*. You can retrieve the value by looking at the function in the AWS Console. -To pass payload data to a function, create a :aws-java-class:`SdkBytes ` -object that contains information. For example, in the following code example, notice the JSON data passed to the Lambda function. +To pass payload data to a function, invoke the :aws-java-class:`InvokeRequest ` +object's :methodname:`withPayload` method and specify a String in JSON format, as shown in the following code example. **Imports** From 474d32e6bdeb8fb4cca6ec6071d470988a5e28ef Mon Sep 17 00:00:00 2001 From: scmacdon Date: Tue, 3 Dec 2019 10:56:55 -0500 Subject: [PATCH 072/139] added new section --- doc_source/examples-lambda.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc_source/examples-lambda.rst b/doc_source/examples-lambda.rst index 516273d..2549dee 100644 --- a/doc_source/examples-lambda.rst +++ b/doc_source/examples-lambda.rst @@ -26,9 +26,9 @@ This section provides examples of programming with the Lambda service client by .. _invoke-function: Invoke a Lambda function -======================== +======================== -You can invoke a Lambda function by creating a :aws-java-class:`AWSLambda ` +You can invoke a Lambda function by creating an :aws-java-class:`AWSLambda ` object and invoking its :methodname:`invoke` method. Create an :aws-java-class:`InvokeRequest ` object to specify additional information such as the function name and the payload to pass to the Lambda function. Function names appear as *arn:aws:lambda:us-west-2:555556330391:function:HelloFunction*. You can retrieve the value by looking at the function in the AWS Console. @@ -54,12 +54,12 @@ See the :sdk-examples-java-s3:`complete example ` on GitHub. .. _list-function: List Lambda functions -========================= +===================== -Build a :aws-java-class:`LambdaClient ` +Build an :aws-java-class:`AWSLambda ` object and invoke its :methodname:`listFunctions` method. -This method returns a :aws-java-class:`ListFunctionsResponse ` object. -You can invoke this object's :methodname:`functions` method to return a list of :aws-java-class:`FunctionConfiguration ` objects. +This method returns a :aws-java-class:`ListFunctionsResult ` object. +You can invoke this object's :methodname:`getFunctions` method to return a list of :aws-java-class:`FunctionConfiguration ` objects. You can iterate through the list to retrieve information about the functions. For example, the following Java code example shows how to get each function name. From 7f40b668cbfda7d161c7a719b9d7396e187af652 Mon Sep 17 00:00:00 2001 From: scmacdon Date: Tue, 3 Dec 2019 11:13:07 -0500 Subject: [PATCH 073/139] added new section --- doc_source/examples-lambda.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_source/examples-lambda.rst b/doc_source/examples-lambda.rst index 2549dee..90c3cd2 100644 --- a/doc_source/examples-lambda.rst +++ b/doc_source/examples-lambda.rst @@ -83,7 +83,7 @@ See the :sdk-examples-java-s3:`complete example ` on GitHub. Delete a Lambda function ======================== -Build a :aws-java-class:`LambdaClient ` +Build an :aws-java-class:`AWSLambda ` object and invoke its :methodname:`deleteFunction` method. Create a :aws-java-class:`DeleteFunctionRequest ` object and pass it to the :methodname:`deleteFunction` method. This object contains information such as the name of the function to delete. From 4e6efef2513b1053fcf6f4515c4f29f70210feac Mon Sep 17 00:00:00 2001 From: scmacdon Date: Tue, 3 Dec 2019 16:35:15 -0500 Subject: [PATCH 074/139] added an example --- doc_source/examples-ec2-regions-zones.rst | 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/doc_source/examples-ec2-regions-zones.rst b/doc_source/examples-ec2-regions-zones.rst index 4d93ba1..ea9de5c 100644 --- a/doc_source/examples-ec2-regions-zones.rst +++ b/doc_source/examples-ec2-regions-zones.rst @@ -68,6 +68,35 @@ objects that represent each Availability Zone. See the :sdk-examples-java-ec2:`complete example `. +Describing Accounts +================== + +To describe your account, call the |ec2client|'s :methodname:`describeAccountAttributes` +method. This method returns a :aws-java-class:`DescribeAccountAttributesResult ` object. +Invoke this objects :methodname:`getAccountAttributes` method to get a list of :aws-java-class:`AccountAttribute +` objects. You can iterate through the list to retrieve an +:aws-java-class:`AccountAttribute ` object. + +You can +get your account's attribute values by invoking the :aws-java-class:`AccountAttribute ` object's +:methodname:`getAttributeValues` method. This method returns a list of :aws-java-class:`AccountAttributeValue +` objects. You can iterate through this second list to display the value of attributes (see the following code example). + +**Imports** + +.. literalinclude:: ec2.java2.describe_region_and_zones.import.txt + :language: java + +**Code** + +.. literalinclude:: ec2.java2.describe_region_and_zones.region.txt + :dedent: 8 + :language: java + +See the :sdk-examples-java-ec2:`complete example ` on GitHub. + + + More Information ================ From 72772b25c207f35cee812211b28ed659ed3504a1 Mon Sep 17 00:00:00 2001 From: Paul Cornell Date: Wed, 4 Dec 2019 16:11:15 +0000 Subject: [PATCH 075/139] Periodic update 2019-12-04 08:11 PT. --- doc_source/conf.py | 2 +- doc_source/data-protection.rst | 46 ++++++++++++++++++++++++++++++++++ doc_source/index.rst | 1 + doc_source/security.rst | 31 +++++++++++++++++++++++ 4 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 doc_source/data-protection.rst create mode 100644 doc_source/security.rst diff --git a/doc_source/conf.py b/doc_source/conf.py index 0737153..c8adbe8 100644 --- a/doc_source/conf.py +++ b/doc_source/conf.py @@ -121,7 +121,7 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'bizstyle' +html_theme = 'default' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the diff --git a/doc_source/data-protection.rst b/doc_source/data-protection.rst new file mode 100644 index 0000000..c315926 --- /dev/null +++ b/doc_source/data-protection.rst @@ -0,0 +1,46 @@ +.. Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 + International License (the "License"). You may not use this file except in compliance with the + License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. + + This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + either express or implied. See the License for the specific language governing permissions and + limitations under the License. + +##################################### +Data Protection in |SERVICENAMETITLE| +##################################### + +.. meta:: + :description: Learn how the AWS shared responsibility model applies to data protection in this AWS product or service. + :keywords: + +.. include:: common/_security-includes.txt + +|SERVICENAMESENTENCECASE| conforms to the `shared responsibility model `_, +which includes regulations and guidelines for data protection. |AWSlong| (|AWS|) is responsible for protecting the global infrastructure +that runs all the |AWS| services. |AWS| maintains control over data hosted on this infrastructure, including the security configuration +controls for handling customer content and personal data. |AWS| customers and APN partners, acting either as data controllers or data +processors, are responsible for any personal data that they put in the |AWS| Cloud. + +For data protection purposes, we recommend that you protect |AWS| account credentials and set up individual user accounts with +|IAMlong| (|IAM|), so that each user is given only the permissions necessary to fulfill their job duties. We also recommend that +you secure your data in the following ways: + +* Use multi-factor authentication (MFA) with each account. +* Use SSL/TLS to communicate with |AWS| resources. +* Set up API and user activity logging with |CTlong|. +* Use |AWS| encryption solutions, along with all default security controls within |AWS| services. +* Use advanced managed security services such as |MCElong|, which assists in discovering and securing personal data that + is stored in |S3|. + +We strongly recommend that you never put sensitive identifying information, such as your customers' account numbers, into +free-form fields such as a **Name** field. This includes when you work with |SERVICENAME| or other |AWS| services +using the console, API, |CLI|, or |AWS| SDKs. Any data that you enter into |SERVICENAME| or other services might get picked up +for inclusion in diagnostic logs. When you provide a URL to an external server, don't include credentials information in the URL +to validate your request to that server. + +For more information about data protection, see the +`AWS Shared Responsibility Model and GDPR `_ +blog post on the *AWS Security Blog*. \ No newline at end of file diff --git a/doc_source/index.rst b/doc_source/index.rst index 4c68e99..59814c8 100644 --- a/doc_source/index.rst +++ b/doc_source/index.rst @@ -24,6 +24,7 @@ getting-started basics Code Examples + Security document-history .. include:: about-aws.txt diff --git a/doc_source/security.rst b/doc_source/security.rst new file mode 100644 index 0000000..827ac76 --- /dev/null +++ b/doc_source/security.rst @@ -0,0 +1,31 @@ +.. Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 + International License (the "License"). You may not use this file except in compliance with the + License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. + + This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + either express or implied. See the License for the specific language governing permissions and + limitations under the License. + +############################### +Security for |SERVICENAMETITLE| +############################### + +.. meta:: + :description: Provides security-related information for this AWS product or service. + :keywords: + +.. include:: common/_security-includes.txt + +.. include:: common/_security.txt + +.. toctree:: + :maxdepth: 1 + :titlesonly: + + Data Protection + Identity and Access Management + Compliance Validation + Resilience + Infrastructure Security From feecc24cdcc61b4fdc5af0ea5cbe8241eac4ff2c Mon Sep 17 00:00:00 2001 From: scmacdon Date: Wed, 11 Dec 2019 12:08:51 -0500 Subject: [PATCH 076/139] updated content --- doc_source/examples-lambda.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_source/examples-lambda.rst b/doc_source/examples-lambda.rst index 90c3cd2..90b6c73 100644 --- a/doc_source/examples-lambda.rst +++ b/doc_source/examples-lambda.rst @@ -38,7 +38,7 @@ object's :methodname:`withPayload` method and specify a String in JSON format, a **Imports** -.. literalinclude:: s3.java2.s3_object_operations.import.txt +.. literalinclude:: lambda.java1.invoke.import.txt :language: java **Code** From ed85c0635c7e009b87e3af8e8a8b761cf2ab3cce Mon Sep 17 00:00:00 2001 From: scmacdon Date: Wed, 11 Dec 2019 12:35:49 -0500 Subject: [PATCH 077/139] updated content --- doc_source/examples-lambda.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_source/examples-lambda.rst b/doc_source/examples-lambda.rst index 90b6c73..90c3cd2 100644 --- a/doc_source/examples-lambda.rst +++ b/doc_source/examples-lambda.rst @@ -38,7 +38,7 @@ object's :methodname:`withPayload` method and specify a String in JSON format, a **Imports** -.. literalinclude:: lambda.java1.invoke.import.txt +.. literalinclude:: s3.java2.s3_object_operations.import.txt :language: java **Code** From b7748a026c899e0903883d5c84307ebd8eca5db0 Mon Sep 17 00:00:00 2001 From: scmacdon Date: Wed, 11 Dec 2019 12:46:41 -0500 Subject: [PATCH 078/139] updated content --- doc_source/examples-lambda.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_source/examples-lambda.rst b/doc_source/examples-lambda.rst index 90c3cd2..90b6c73 100644 --- a/doc_source/examples-lambda.rst +++ b/doc_source/examples-lambda.rst @@ -38,7 +38,7 @@ object's :methodname:`withPayload` method and specify a String in JSON format, a **Imports** -.. literalinclude:: s3.java2.s3_object_operations.import.txt +.. literalinclude:: lambda.java1.invoke.import.txt :language: java **Code** From 354a91332ddbd975547e366ba737cf9267c82d62 Mon Sep 17 00:00:00 2001 From: scmacdon Date: Wed, 11 Dec 2019 13:24:38 -0500 Subject: [PATCH 079/139] updated content --- doc_source/examples-lambda.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc_source/examples-lambda.rst b/doc_source/examples-lambda.rst index 90b6c73..4044ba5 100644 --- a/doc_source/examples-lambda.rst +++ b/doc_source/examples-lambda.rst @@ -45,7 +45,7 @@ object's :methodname:`withPayload` method and specify a String in JSON format, a The following code example demonstrates how to invoke a Lambda function. -.. literalinclude:: s3.java2.s3_object_operations.upload.txt +.. literalinclude:: lambda.java1.invoke.main.txt :language: java See the :sdk-examples-java-s3:`complete example ` on GitHub. @@ -65,14 +65,14 @@ You can iterate through the list to retrieve information about the functions. Fo **Imports** -.. literalinclude:: s3.java2.s3_object_operations.import.txt +.. literalinclude:: lambda.java1.list.import.txt :language: java **Code** The following Java code example demonstrates how to retrieve a list of function names. -.. literalinclude:: s3.java2.s3_object_operations.upload.txt +.. literalinclude:: lambda.java1.list.main.txt :language: java See the :sdk-examples-java-s3:`complete example ` on GitHub. @@ -91,14 +91,14 @@ Function names appear as *arn:aws:lambda:us-west-2:555556330391:function:HelloFu **Imports** -.. literalinclude:: s3.java2.s3_object_operations.import.txt +.. literalinclude:: lambda.java1.delete.import.txt :language: java **Code** The following Java code demonstrates how to delete a Lambda function. -.. literalinclude:: s3.java2.s3_object_operations.upload.txt +.. literalinclude:: lambda.java1.delete.main.txt :language: java See the :sdk-examples-java-s3:`complete example ` on GitHub. From 72b59b77783bdec08fd176bee9f0ab678e459df3 Mon Sep 17 00:00:00 2001 From: scmacdon Date: Wed, 11 Dec 2019 13:56:47 -0500 Subject: [PATCH 080/139] updated content --- doc_source/examples-lambda.rst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/doc_source/examples-lambda.rst b/doc_source/examples-lambda.rst index 4044ba5..a228b81 100644 --- a/doc_source/examples-lambda.rst +++ b/doc_source/examples-lambda.rst @@ -48,7 +48,8 @@ The following code example demonstrates how to invoke a Lambda function. .. literalinclude:: lambda.java1.invoke.main.txt :language: java -See the :sdk-examples-java-s3:`complete example ` on GitHub. +See the complete example on `Github +`_. .. _list-function: @@ -75,7 +76,8 @@ The following Java code example demonstrates how to retrieve a list of function .. literalinclude:: lambda.java1.list.main.txt :language: java -See the :sdk-examples-java-s3:`complete example ` on GitHub. +See the complete example on `Github +`_. .. _delete-function: @@ -101,6 +103,7 @@ The following Java code demonstrates how to delete a Lambda function. .. literalinclude:: lambda.java1.delete.main.txt :language: java -See the :sdk-examples-java-s3:`complete example ` on GitHub. +See the complete example on `Github +`_. From cb21064230be42eb80b9b72206dfed85275de4e2 Mon Sep 17 00:00:00 2001 From: scmacdon Date: Thu, 12 Dec 2019 17:26:36 -0500 Subject: [PATCH 081/139] updated content --- doc_source/examples-lambda.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_source/examples-lambda.rst b/doc_source/examples-lambda.rst index a228b81..bb4b7d0 100644 --- a/doc_source/examples-lambda.rst +++ b/doc_source/examples-lambda.rst @@ -71,7 +71,7 @@ You can iterate through the list to retrieve information about the functions. Fo **Code** -The following Java code example demonstrates how to retrieve a list of function names. +The following Java code example demonstrates how to retrieve a list of Lambda function names. .. literalinclude:: lambda.java1.list.main.txt :language: java From c91ae76ed2631ac5974d140cafbc13a9899867be Mon Sep 17 00:00:00 2001 From: scmacdon Date: Fri, 13 Dec 2019 11:14:30 -0500 Subject: [PATCH 082/139] updated content --- doc_source/setup-credentials.rst | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/doc_source/setup-credentials.rst b/doc_source/setup-credentials.rst index c9caf99..858a1eb 100644 --- a/doc_source/setup-credentials.rst +++ b/doc_source/setup-credentials.rst @@ -48,6 +48,31 @@ Once you have set your AWS credentials using one of these methods, they will be by the |sdk-java| by using the default credential provider chain. For further information about working with AWS credentials in your Java applications, see :doc:`credentials`. + +.. _refresh-credentials: +Refreshing IMDS credentials +=========================== + +The|sdk-java| supports opt-in refreshing IMDS credentials in the background every 1 minute, regardless of the credential expiration time. +That’s frequent enough that a relatively short outage should not impact the perceived AWS availability. + +.. code:: java + + // Refresh credentials using a background thread, automatically every minute. This will log an error if IMDS is down during +// a refresh, but customer's service calls will continue using the cached credentials until the credentials are refreshed +// again one minute later. + +InstanceProfileCredentialsProvider credentials = + InstanceProfileCredentialsProvider.createAsyncRefreshingProvider(true); + +AmazonS3Client.builder() + .withCredentials(credentials) + .build(); + +// This is new: When the customer is done with the credentials provider, they must close it to release the background thread. +credentials.close(); + + .. _setup-credentials-setting-region: Setting the AWS Region From 8aeffd909c780cd30603615152a9a78c5777394c Mon Sep 17 00:00:00 2001 From: scmacdon Date: Fri, 13 Dec 2019 11:26:07 -0500 Subject: [PATCH 083/139] updated content --- doc_source/setup-credentials.rst | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/doc_source/setup-credentials.rst b/doc_source/setup-credentials.rst index 858a1eb..16d22e4 100644 --- a/doc_source/setup-credentials.rst +++ b/doc_source/setup-credentials.rst @@ -56,21 +56,22 @@ Refreshing IMDS credentials The|sdk-java| supports opt-in refreshing IMDS credentials in the background every 1 minute, regardless of the credential expiration time. That’s frequent enough that a relatively short outage should not impact the perceived AWS availability. -.. code:: java - - // Refresh credentials using a background thread, automatically every minute. This will log an error if IMDS is down during -// a refresh, but customer's service calls will continue using the cached credentials until the credentials are refreshed -// again one minute later. - -InstanceProfileCredentialsProvider credentials = - InstanceProfileCredentialsProvider.createAsyncRefreshingProvider(true); - -AmazonS3Client.builder() - .withCredentials(credentials) - .build(); - -// This is new: When the customer is done with the credentials provider, they must close it to release the background thread. -credentials.close(); +.. code-block:: java + :linenos: + +1. // Refresh credentials using a background thread, automatically every minute. This will log an error if IMDS is down during +2. // a refresh, but customer's service calls will continue using the cached credentials until the credentials are refreshed +3. // again one minute later. +4. +5. InstanceProfileCredentialsProvider credentials = +6. InstanceProfileCredentialsProvider.createAsyncRefreshingProvider(true); +7. +8. AmazonS3Client.builder() +9. .withCredentials(credentials) +10. .build(); +11. +12. // This is new: When the customer is done with the credentials provider, they must close it to release the background thread. +23. credentials.close(); .. _setup-credentials-setting-region: From 022a8b82fa124a0f244cc993ab1f7a2e430eb213 Mon Sep 17 00:00:00 2001 From: scmacdon Date: Fri, 13 Dec 2019 11:29:05 -0500 Subject: [PATCH 084/139] updated content --- doc_source/setup-credentials.rst | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/doc_source/setup-credentials.rst b/doc_source/setup-credentials.rst index 16d22e4..cc4043b 100644 --- a/doc_source/setup-credentials.rst +++ b/doc_source/setup-credentials.rst @@ -59,19 +59,19 @@ That’s frequent enough that a relatively short outage should not impact the pe .. code-block:: java :linenos: -1. // Refresh credentials using a background thread, automatically every minute. This will log an error if IMDS is down during -2. // a refresh, but customer's service calls will continue using the cached credentials until the credentials are refreshed -3. // again one minute later. -4. -5. InstanceProfileCredentialsProvider credentials = -6. InstanceProfileCredentialsProvider.createAsyncRefreshingProvider(true); -7. -8. AmazonS3Client.builder() -9. .withCredentials(credentials) -10. .build(); -11. -12. // This is new: When the customer is done with the credentials provider, they must close it to release the background thread. -23. credentials.close(); + 1. // Refresh credentials using a background thread, automatically every minute. This will log an error if IMDS is down during + 2. // a refresh, but your service calls will continue using the cached credentials until the credentials are refreshed + 3. // again one minute later. + 4. + 5. InstanceProfileCredentialsProvider credentials = + 6. InstanceProfileCredentialsProvider.createAsyncRefreshingProvider(true); + 7. + 8. AmazonS3Client.builder() + 9. .withCredentials(credentials) + 10. .build(); + 11. + 12. // This is new: When you are done with the credentials provider, you must close it to release the background thread. + 23. credentials.close(); .. _setup-credentials-setting-region: From 126940353293d290df492178e5ef3d36f3acac57 Mon Sep 17 00:00:00 2001 From: scmacdon Date: Fri, 13 Dec 2019 11:39:21 -0500 Subject: [PATCH 085/139] updated content --- doc_source/setup-credentials.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_source/setup-credentials.rst b/doc_source/setup-credentials.rst index cc4043b..12b1e95 100644 --- a/doc_source/setup-credentials.rst +++ b/doc_source/setup-credentials.rst @@ -53,7 +53,7 @@ working with AWS credentials in your Java applications, see :doc:`credentials`. Refreshing IMDS credentials =========================== -The|sdk-java| supports opt-in refreshing IMDS credentials in the background every 1 minute, regardless of the credential expiration time. +The |sdk-java| supports opt-in refreshing IMDS credentials in the background every 1 minute, regardless of the credential expiration time. That’s frequent enough that a relatively short outage should not impact the perceived AWS availability. .. code-block:: java From 1044384cbcda0308b818757a8fada56833c14187 Mon Sep 17 00:00:00 2001 From: scmacdon Date: Fri, 13 Dec 2019 12:11:31 -0500 Subject: [PATCH 086/139] updated content --- doc_source/setup-credentials.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc_source/setup-credentials.rst b/doc_source/setup-credentials.rst index 12b1e95..c58b718 100644 --- a/doc_source/setup-credentials.rst +++ b/doc_source/setup-credentials.rst @@ -54,7 +54,8 @@ Refreshing IMDS credentials =========================== The |sdk-java| supports opt-in refreshing IMDS credentials in the background every 1 minute, regardless of the credential expiration time. -That’s frequent enough that a relatively short outage should not impact the perceived AWS availability. +This allows you to refresh credentials more frequently and reduces the chance that not reaching IMDS impacts +the perceived AWS availability. .. code-block:: java :linenos: From 5aae0ca2d3de386614a1045b09734c797cba6c70 Mon Sep 17 00:00:00 2001 From: scmacdon Date: Fri, 13 Dec 2019 12:12:39 -0500 Subject: [PATCH 087/139] updated content --- doc_source/setup-credentials.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_source/setup-credentials.rst b/doc_source/setup-credentials.rst index c58b718..127b3b3 100644 --- a/doc_source/setup-credentials.rst +++ b/doc_source/setup-credentials.rst @@ -72,7 +72,7 @@ the perceived AWS availability. 10. .build(); 11. 12. // This is new: When you are done with the credentials provider, you must close it to release the background thread. - 23. credentials.close(); + 13. credentials.close(); .. _setup-credentials-setting-region: From 50ace1ffa1597957ce8efe6ba6de2fa3c09f3a10 Mon Sep 17 00:00:00 2001 From: scmacdon Date: Thu, 2 Jan 2020 13:56:48 -0500 Subject: [PATCH 088/139] added the code tags --- doc_source/examples-dynamodb-items.rst | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/doc_source/examples-dynamodb-items.rst b/doc_source/examples-dynamodb-items.rst index 5caefc1..1d2e909 100644 --- a/doc_source/examples-dynamodb-items.rst +++ b/doc_source/examples-dynamodb-items.rst @@ -110,6 +110,30 @@ update. See the :sdk-examples-java-dynamodb:`complete example ` on GitHub. +Use the DynamoDBMapper class +================================== + +The |sdk-java|_ provides a :aws-java-class:`DynamoDBMapper ` class, +allowing you to map your client-side classes to Amazon DynamoDB tables. To use the :aws-java-class:`DynamoDBMapper ` class, +you define the relationship between items in a DynamoDB table and their corresponding object instances in your code. +The :aws-java-class:`DynamoDBMapper ` class enables you to access your tables; perform various create, read, update, and delete (CRUD) operations; and execute queries. + +.. note:: The :aws-java-class:`DynamoDBMapper ` class does not allow you to create, update, or delete tables. + +**Imports** + +.. literalinclude:: example_code/dynamodb/src/main/java/aws/example/dynamodb/UpdateItem.java + :lines: 15-22 + :language: java + +**Code** + +.. literalinclude:: example_code/dynamodb/src/main/java/aws/example/dynamodb/UpdateItem.java + :lines: 82-105 + :dedent: 8 + :language: java + +See the :sdk-examples-java-dynamodb:`complete example ` on GitHub. More Info ========= From cf85c3b39ebecbc9da17ed3868af8861e3801c0b Mon Sep 17 00:00:00 2001 From: scmacdon Date: Thu, 2 Jan 2020 14:37:36 -0500 Subject: [PATCH 089/139] added the code tags --- doc_source/examples-dynamodb-items.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc_source/examples-dynamodb-items.rst b/doc_source/examples-dynamodb-items.rst index 1d2e909..521bba9 100644 --- a/doc_source/examples-dynamodb-items.rst +++ b/doc_source/examples-dynamodb-items.rst @@ -128,6 +128,11 @@ The :aws-java-class:`DynamoDBMapper ` in the |ddb-dg|. + +After the content is added to the table, notice that an item is loaded by using the +Partition Key and Sort Key. Then the *Awards* item is updated. .. literalinclude:: example_code/dynamodb/src/main/java/aws/example/dynamodb/UpdateItem.java :lines: 82-105 :dedent: 8 From cecc97f3a3275f1599f66b610f9f722d50bcfd95 Mon Sep 17 00:00:00 2001 From: scmacdon Date: Thu, 2 Jan 2020 14:49:30 -0500 Subject: [PATCH 090/139] added the code tags --- doc_source/examples-dynamodb-items.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc_source/examples-dynamodb-items.rst b/doc_source/examples-dynamodb-items.rst index 521bba9..77ca384 100644 --- a/doc_source/examples-dynamodb-items.rst +++ b/doc_source/examples-dynamodb-items.rst @@ -132,7 +132,8 @@ The following Java code example shows you how to add content to the Music table. :ddb-dg:`Create a Table ` in the |ddb-dg|. After the content is added to the table, notice that an item is loaded by using the -Partition Key and Sort Key. Then the *Awards* item is updated. +*Partition* and *Sort* keys. Then the *Awards* item is updated. + .. literalinclude:: example_code/dynamodb/src/main/java/aws/example/dynamodb/UpdateItem.java :lines: 82-105 :dedent: 8 From 196e090bbec1a1831b3de6cd409f5dbc74a1d449 Mon Sep 17 00:00:00 2001 From: scmacdon Date: Thu, 2 Jan 2020 15:00:32 -0500 Subject: [PATCH 091/139] added the code tags --- doc_source/examples-dynamodb-items.rst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/doc_source/examples-dynamodb-items.rst b/doc_source/examples-dynamodb-items.rst index 77ca384..75d24e1 100644 --- a/doc_source/examples-dynamodb-items.rst +++ b/doc_source/examples-dynamodb-items.rst @@ -129,9 +129,7 @@ The :aws-java-class:`DynamoDBMapper ` in the |ddb-dg|. - -After the content is added to the table, notice that an item is loaded by using the +:ddb-dg:`Create a Table ` in the |ddb-dg|. After the content is added to the table, notice that an item is loaded by using the *Partition* and *Sort* keys. Then the *Awards* item is updated. .. literalinclude:: example_code/dynamodb/src/main/java/aws/example/dynamodb/UpdateItem.java From ddd0b6babdf0b0dd6067b63fb2f26009b3e035bc Mon Sep 17 00:00:00 2001 From: scmacdon Date: Thu, 2 Jan 2020 15:04:36 -0500 Subject: [PATCH 092/139] added the code tags --- doc_source/examples-dynamodb-items.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_source/examples-dynamodb-items.rst b/doc_source/examples-dynamodb-items.rst index 75d24e1..7cc66dd 100644 --- a/doc_source/examples-dynamodb-items.rst +++ b/doc_source/examples-dynamodb-items.rst @@ -128,7 +128,7 @@ The :aws-java-class:`DynamoDBMapper ` in the |ddb-dg|. After the content is added to the table, notice that an item is loaded by using the *Partition* and *Sort* keys. Then the *Awards* item is updated. From fffff9b87b31cbb52c858a5e42601c2b13242551 Mon Sep 17 00:00:00 2001 From: scmacdon Date: Thu, 2 Jan 2020 15:26:23 -0500 Subject: [PATCH 093/139] added the code tags --- doc_source/examples-dynamodb-items.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc_source/examples-dynamodb-items.rst b/doc_source/examples-dynamodb-items.rst index 7cc66dd..98c336d 100644 --- a/doc_source/examples-dynamodb-items.rst +++ b/doc_source/examples-dynamodb-items.rst @@ -128,8 +128,9 @@ The :aws-java-class:`DynamoDBMapper ` in the |ddb-dg|. After the content is added to the table, notice that an item is loaded by using the +The following Java code example shows you how to add content to the *Music* table by using the :aws-java-class:`DynamoDBMapper ` class. +For information on creating the *Music* table, see :ddb-dg:`Create a Table ` in the |ddb-dg|. +After the content is added to the table, notice that an item is loaded by using the *Partition* and *Sort* keys. Then the *Awards* item is updated. .. literalinclude:: example_code/dynamodb/src/main/java/aws/example/dynamodb/UpdateItem.java From 50d89750ca61acbbe8e88f818204ccad411644ac Mon Sep 17 00:00:00 2001 From: scmacdon Date: Thu, 2 Jan 2020 15:46:01 -0500 Subject: [PATCH 094/139] added the code tags --- doc_source/examples-dynamodb-items.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_source/examples-dynamodb-items.rst b/doc_source/examples-dynamodb-items.rst index 98c336d..953cce1 100644 --- a/doc_source/examples-dynamodb-items.rst +++ b/doc_source/examples-dynamodb-items.rst @@ -115,7 +115,7 @@ Use the DynamoDBMapper class The |sdk-java|_ provides a :aws-java-class:`DynamoDBMapper ` class, allowing you to map your client-side classes to Amazon DynamoDB tables. To use the :aws-java-class:`DynamoDBMapper ` class, -you define the relationship between items in a DynamoDB table and their corresponding object instances in your code. +you define the relationship between items in a DynamoDB table and their corresponding object instances in your code by using annotations (as shown in the following code example). The :aws-java-class:`DynamoDBMapper ` class enables you to access your tables; perform various create, read, update, and delete (CRUD) operations; and execute queries. .. note:: The :aws-java-class:`DynamoDBMapper ` class does not allow you to create, update, or delete tables. From cef3adc13f4c1669bc950036e0fe729e2b1a18c6 Mon Sep 17 00:00:00 2001 From: scmacdon Date: Thu, 2 Jan 2020 15:52:58 -0500 Subject: [PATCH 095/139] added the code tags --- doc_source/examples-dynamodb-items.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_source/examples-dynamodb-items.rst b/doc_source/examples-dynamodb-items.rst index 953cce1..1649586 100644 --- a/doc_source/examples-dynamodb-items.rst +++ b/doc_source/examples-dynamodb-items.rst @@ -138,7 +138,7 @@ After the content is added to the table, notice that an item is loaded by using :dedent: 8 :language: java -See the :sdk-examples-java-dynamodb:`complete example ` on GitHub. +See the :sdk-examples-java-dynamodb:`complete example ` on GitHub. More Info ========= From d956354229e9a7c28f67e52b784782c7628ec669 Mon Sep 17 00:00:00 2001 From: scmacdon Date: Fri, 3 Jan 2020 10:49:50 -0500 Subject: [PATCH 096/139] added the code tags --- doc_source/examples-dynamodb-items.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc_source/examples-dynamodb-items.rst b/doc_source/examples-dynamodb-items.rst index 1649586..4affebb 100644 --- a/doc_source/examples-dynamodb-items.rst +++ b/doc_source/examples-dynamodb-items.rst @@ -122,8 +122,8 @@ The :aws-java-class:`DynamoDBMapper Date: Fri, 3 Jan 2020 11:05:15 -0500 Subject: [PATCH 097/139] added the code tags --- doc_source/examples-dynamodb-items.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc_source/examples-dynamodb-items.rst b/doc_source/examples-dynamodb-items.rst index 4affebb..1649586 100644 --- a/doc_source/examples-dynamodb-items.rst +++ b/doc_source/examples-dynamodb-items.rst @@ -122,8 +122,8 @@ The :aws-java-class:`DynamoDBMapper Date: Fri, 3 Jan 2020 12:45:24 -0500 Subject: [PATCH 098/139] added the code tags --- doc_source/examples-dynamodb-items.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_source/examples-dynamodb-items.rst b/doc_source/examples-dynamodb-items.rst index 1649586..458bcea 100644 --- a/doc_source/examples-dynamodb-items.rst +++ b/doc_source/examples-dynamodb-items.rst @@ -133,7 +133,7 @@ For information on creating the *Music* table, see :ddb-dg:`Create a Table Date: Fri, 3 Jan 2020 13:10:59 -0500 Subject: [PATCH 099/139] added the code tags --- doc_source/examples-dynamodb-items.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_source/examples-dynamodb-items.rst b/doc_source/examples-dynamodb-items.rst index 458bcea..1649586 100644 --- a/doc_source/examples-dynamodb-items.rst +++ b/doc_source/examples-dynamodb-items.rst @@ -133,7 +133,7 @@ For information on creating the *Music* table, see :ddb-dg:`Create a Table Date: Mon, 6 Jan 2020 09:48:50 -0500 Subject: [PATCH 100/139] added the code tags --- doc_source/examples-dynamodb-items.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_source/examples-dynamodb-items.rst b/doc_source/examples-dynamodb-items.rst index 1649586..458bcea 100644 --- a/doc_source/examples-dynamodb-items.rst +++ b/doc_source/examples-dynamodb-items.rst @@ -133,7 +133,7 @@ For information on creating the *Music* table, see :ddb-dg:`Create a Table Date: Mon, 6 Jan 2020 11:15:04 -0500 Subject: [PATCH 101/139] added setup info --- doc_source/setup-install.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc_source/setup-install.rst b/doc_source/setup-install.rst index d304e8d..2541b0c 100644 --- a/doc_source/setup-install.rst +++ b/doc_source/setup-install.rst @@ -47,7 +47,8 @@ system or IDE: which will automatically download, install and update the Java SDK for you. For more information and setup instructions, see the |tke-ug|_. -If you intend to build your projects using a different IDE, with Apache Ant or by any other means, +If you are using one the above methods (for example, +you are using Maven), then you do not need to download and install the AWS JAR files (you can skip the following section). If you intend to build your projects using a different IDE, with Apache Ant or by any other means, then download and extract the SDK as shown in the next section. .. _download-and-extract-sdk: From d6c5d055159bb79aef8c5b1241e8b6571d78225e Mon Sep 17 00:00:00 2001 From: scmacdon Date: Mon, 6 Jan 2020 11:41:02 -0500 Subject: [PATCH 102/139] added additional info --- doc_source/examples-lambda.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc_source/examples-lambda.rst b/doc_source/examples-lambda.rst index bb4b7d0..ef50ba7 100644 --- a/doc_source/examples-lambda.rst +++ b/doc_source/examples-lambda.rst @@ -18,7 +18,8 @@ Invoking, Listing, and Deleting Lambda Functions deleteFunction, invoke, listFunctions -This section provides examples of programming with the Lambda service client by using the AWS SDK for Java. +This section provides examples of programming with the Lambda service client by using the AWS SDK for Java. To learn how to +create a Lambda function, see see :AWS Toolkit for Eclipse:`Tutorial: How to Create, Upload, and Invoke an AWS Lambda Function ` in the AWS Toolkit for Eclipse. .. contents:: :local: From ce1fc145c182c0680a514f7ee7e5523e85ab59f2 Mon Sep 17 00:00:00 2001 From: scmacdon Date: Mon, 6 Jan 2020 11:48:12 -0500 Subject: [PATCH 103/139] added additional info --- doc_source/lambda-examples.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc_source/lambda-examples.rst b/doc_source/lambda-examples.rst index d0cdacf..2687321 100644 --- a/doc_source/lambda-examples.rst +++ b/doc_source/lambda-examples.rst @@ -13,10 +13,10 @@ Lambda Examples Using the |sdk-java| ########################################## .. meta:: - :description: Programming Amazon Lambda using the AWS SDK for Java 2.x + :description: Programming Amazon Lambda using the AWS SDK for Java. :keywords: AWS SDK for Java code examples -This section provides examples of programming Lambda using the |sdk-java-v2|. +This section provides examples of programming Lambda using the |sdk-java|. .. include:: includes/complete-examples-note.txt From abe2736f62369c52b8165060b76b7242bfded271 Mon Sep 17 00:00:00 2001 From: scmacdon Date: Mon, 6 Jan 2020 11:50:41 -0500 Subject: [PATCH 104/139] added additional info --- doc_source/examples-lambda.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_source/examples-lambda.rst b/doc_source/examples-lambda.rst index ef50ba7..b45966a 100644 --- a/doc_source/examples-lambda.rst +++ b/doc_source/examples-lambda.rst @@ -19,7 +19,7 @@ Invoking, Listing, and Deleting Lambda Functions This section provides examples of programming with the Lambda service client by using the AWS SDK for Java. To learn how to -create a Lambda function, see see :AWS Toolkit for Eclipse:`Tutorial: How to Create, Upload, and Invoke an AWS Lambda Function ` in the AWS Toolkit for Eclipse. +create a Lambda function, see see :tke:`Tutorial: How to Create, Upload, and Invoke an AWS Lambda Function ` in the |tke|. .. contents:: :local: From 2b78cab356dc14ec155b08cdfdb0f0586d2e691c Mon Sep 17 00:00:00 2001 From: scmacdon Date: Mon, 6 Jan 2020 12:00:16 -0500 Subject: [PATCH 105/139] added additional info --- doc_source/examples-lambda.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_source/examples-lambda.rst b/doc_source/examples-lambda.rst index b45966a..e524d4d 100644 --- a/doc_source/examples-lambda.rst +++ b/doc_source/examples-lambda.rst @@ -19,7 +19,7 @@ Invoking, Listing, and Deleting Lambda Functions This section provides examples of programming with the Lambda service client by using the AWS SDK for Java. To learn how to -create a Lambda function, see see :tke:`Tutorial: How to Create, Upload, and Invoke an AWS Lambda Function ` in the |tke|. +create a Lambda function, see `How to Create AWS Lambda functions `_. .. contents:: :local: From d7a0cde84ceb2dac95a6387bdf3c1b3021b81ff2 Mon Sep 17 00:00:00 2001 From: scmacdon Date: Mon, 6 Jan 2020 12:09:28 -0500 Subject: [PATCH 106/139] added the code tags --- doc_source/examples-dynamodb-items.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc_source/examples-dynamodb-items.rst b/doc_source/examples-dynamodb-items.rst index 458bcea..3b57198 100644 --- a/doc_source/examples-dynamodb-items.rst +++ b/doc_source/examples-dynamodb-items.rst @@ -134,8 +134,8 @@ After the content is added to the table, notice that an item is loaded by using *Partition* and *Sort* keys. Then the *Awards* item is updated. .. literalinclude:: example_code/dynamodb/src/main/java/aws/example/dynamodb/UseDynamoMapping.java - :lines: 82-105 - :dedent: 8 + :lines: 51-90 + :dedent: 2 :language: java See the :sdk-examples-java-dynamodb:`complete example ` on GitHub. From 65afe0017d1888144b27d2d67a621011f3fc00e9 Mon Sep 17 00:00:00 2001 From: scmacdon Date: Mon, 6 Jan 2020 12:15:50 -0500 Subject: [PATCH 107/139] added the code tags --- doc_source/examples-dynamodb-items.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc_source/examples-dynamodb-items.rst b/doc_source/examples-dynamodb-items.rst index 3b57198..1014cbf 100644 --- a/doc_source/examples-dynamodb-items.rst +++ b/doc_source/examples-dynamodb-items.rst @@ -122,8 +122,8 @@ The :aws-java-class:`DynamoDBMapper Date: Mon, 6 Jan 2020 12:23:40 -0500 Subject: [PATCH 108/139] added the code tags --- doc_source/examples-dynamodb-items.rst | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/doc_source/examples-dynamodb-items.rst b/doc_source/examples-dynamodb-items.rst index 1014cbf..71c844b 100644 --- a/doc_source/examples-dynamodb-items.rst +++ b/doc_source/examples-dynamodb-items.rst @@ -122,8 +122,7 @@ The :aws-java-class:`DynamoDBMapper ` on GitHub. From 1e3bd5484687903ac54e944d985cbed200e7a0ce Mon Sep 17 00:00:00 2001 From: scmacdon Date: Mon, 6 Jan 2020 12:28:43 -0500 Subject: [PATCH 109/139] added the code tags --- doc_source/examples-dynamodb-items.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_source/examples-dynamodb-items.rst b/doc_source/examples-dynamodb-items.rst index 71c844b..cbda484 100644 --- a/doc_source/examples-dynamodb-items.rst +++ b/doc_source/examples-dynamodb-items.rst @@ -133,7 +133,7 @@ After the content is added to the table, notice that an item is loaded by using *Partition* and *Sort* keys. Then the *Awards* item is updated. .. literalinclude:: dynamodb.java.dynamoDB_mapping.main.txt - :dedent: 8 + :dedent: 4 :language: java See the :sdk-examples-java-dynamodb:`complete example ` on GitHub. From fba796400777f926611db1f8ce5baddc8946f3c1 Mon Sep 17 00:00:00 2001 From: scmacdon Date: Mon, 6 Jan 2020 12:34:21 -0500 Subject: [PATCH 110/139] added the code tags --- doc_source/examples-dynamodb-items.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_source/examples-dynamodb-items.rst b/doc_source/examples-dynamodb-items.rst index cbda484..c1de871 100644 --- a/doc_source/examples-dynamodb-items.rst +++ b/doc_source/examples-dynamodb-items.rst @@ -133,7 +133,7 @@ After the content is added to the table, notice that an item is loaded by using *Partition* and *Sort* keys. Then the *Awards* item is updated. .. literalinclude:: dynamodb.java.dynamoDB_mapping.main.txt - :dedent: 4 + :dedent: 2 :language: java See the :sdk-examples-java-dynamodb:`complete example ` on GitHub. From 0466379b2753c280de2dd959a3f2e9fe5d134c31 Mon Sep 17 00:00:00 2001 From: scmacdon Date: Mon, 6 Jan 2020 12:35:38 -0500 Subject: [PATCH 111/139] added the code tags --- doc_source/examples-dynamodb-items.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc_source/examples-dynamodb-items.rst b/doc_source/examples-dynamodb-items.rst index c1de871..343d474 100644 --- a/doc_source/examples-dynamodb-items.rst +++ b/doc_source/examples-dynamodb-items.rst @@ -128,9 +128,8 @@ The :aws-java-class:`DynamoDBMapper ` class. -For information on creating the *Music* table, see :ddb-dg:`Create a Table ` in the |ddb-dg|. After the content is added to the table, notice that an item is loaded by using the -*Partition* and *Sort* keys. Then the *Awards* item is updated. +*Partition* and *Sort* keys. Then the *Awards* item is updated. For information on creating the *Music* table, see :ddb-dg:`Create a Table ` in the |ddb-dg|. .. literalinclude:: dynamodb.java.dynamoDB_mapping.main.txt :dedent: 2 From 271ce62a54155519e2df5ebd4a322953ec4ad01d Mon Sep 17 00:00:00 2001 From: scmacdon Date: Mon, 6 Jan 2020 12:42:14 -0500 Subject: [PATCH 112/139] added the code tags --- doc_source/examples-dynamodb-items.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_source/examples-dynamodb-items.rst b/doc_source/examples-dynamodb-items.rst index 343d474..88046ff 100644 --- a/doc_source/examples-dynamodb-items.rst +++ b/doc_source/examples-dynamodb-items.rst @@ -132,7 +132,7 @@ After the content is added to the table, notice that an item is loaded by using *Partition* and *Sort* keys. Then the *Awards* item is updated. For information on creating the *Music* table, see :ddb-dg:`Create a Table ` in the |ddb-dg|. .. literalinclude:: dynamodb.java.dynamoDB_mapping.main.txt - :dedent: 2 + :dedent: 0 :language: java See the :sdk-examples-java-dynamodb:`complete example ` on GitHub. From 18b477c44aae38b7d1836b4e5c00a7079aee3c5c Mon Sep 17 00:00:00 2001 From: scmacdon Date: Mon, 6 Jan 2020 12:51:24 -0500 Subject: [PATCH 113/139] added the code tags --- doc_source/examples-dynamodb-items.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_source/examples-dynamodb-items.rst b/doc_source/examples-dynamodb-items.rst index 88046ff..a0d0ad2 100644 --- a/doc_source/examples-dynamodb-items.rst +++ b/doc_source/examples-dynamodb-items.rst @@ -132,7 +132,7 @@ After the content is added to the table, notice that an item is loaded by using *Partition* and *Sort* keys. Then the *Awards* item is updated. For information on creating the *Music* table, see :ddb-dg:`Create a Table ` in the |ddb-dg|. .. literalinclude:: dynamodb.java.dynamoDB_mapping.main.txt - :dedent: 0 + :dedent: 8 :language: java See the :sdk-examples-java-dynamodb:`complete example ` on GitHub. From cff3ab7f99709230dd1a2cb2a6cb167a4269f8ea Mon Sep 17 00:00:00 2001 From: scmacdon Date: Mon, 6 Jan 2020 12:56:47 -0500 Subject: [PATCH 114/139] added the code tags --- doc_source/examples-dynamodb-items.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_source/examples-dynamodb-items.rst b/doc_source/examples-dynamodb-items.rst index a0d0ad2..b360d0a 100644 --- a/doc_source/examples-dynamodb-items.rst +++ b/doc_source/examples-dynamodb-items.rst @@ -132,7 +132,7 @@ After the content is added to the table, notice that an item is loaded by using *Partition* and *Sort* keys. Then the *Awards* item is updated. For information on creating the *Music* table, see :ddb-dg:`Create a Table ` in the |ddb-dg|. .. literalinclude:: dynamodb.java.dynamoDB_mapping.main.txt - :dedent: 8 + :dedent: 1 :language: java See the :sdk-examples-java-dynamodb:`complete example ` on GitHub. From f3c126f75ec4bb790d7296d09cdec75ab861d72e Mon Sep 17 00:00:00 2001 From: scmacdon Date: Thu, 9 Jan 2020 11:56:01 -0500 Subject: [PATCH 115/139] fixed order of service provider --- doc_source/java-dg-roles.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc_source/java-dg-roles.rst b/doc_source/java-dg-roles.rst index bf90958..ffafc22 100644 --- a/doc_source/java-dg-roles.rst +++ b/doc_source/java-dg-roles.rst @@ -29,13 +29,15 @@ The default provider chain and EC2 instance profiles If your application creates an AWS client using the default constructor, then the client will search for credentials using the :emphasis:`default credentials provider chain`, in the following order: -1. In system environment variables: :code:`AWS_ACCESS_KEY_ID` and :code:`AWS_SECRET_ACCESS_KEY`. +1. In the Java system properties: :code:`aws.accessKeyId` and :code:`aws.secretKey`. -2. In the Java system properties: :code:`aws.accessKeyId` and :code:`aws.secretKey`. +2. In system environment variables: :code:`AWS_ACCESS_KEY_ID` and :code:`AWS_SECRET_ACCESS_KEY`. 3. In the default credentials file (the location of this file varies by platform). -4. In the :emphasis:`instance profile credentials`, which exist within the instance metadata +4. Credentials delivered through the Amazon EC2 container service if the :code:`AWS_CONTAINER_CREDENTIALS_RELATIVE_URI` environment variable is set and security manager has permission to access the variable. + +5. In the :emphasis:`instance profile credentials`, which exist within the instance metadata associated with the IAM role for the EC2 instance. The final step in the default provider chain is available only when running your application on an From 335d2e00457472276c83fb9ab0954f94edd28a27 Mon Sep 17 00:00:00 2001 From: scmacdon Date: Thu, 9 Jan 2020 21:21:07 -0500 Subject: [PATCH 116/139] added additional info --- doc_source/credentials.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc_source/credentials.rst b/doc_source/credentials.rst index 50fbede..758ad44 100644 --- a/doc_source/credentials.rst +++ b/doc_source/credentials.rst @@ -60,6 +60,7 @@ class. The default credential provider chain looks for credentials in this order variable :envvar:`AWS_CONTAINER_CREDENTIALS_RELATIVE_URI` is set. The |sdk-java| uses the :aws-java-class:`ContainerCredentialsProvider ` to load these credentials. You can specify the IP address for this value. + #. **Instance profile credentials** |ndash| used on EC2 instances, and delivered through the |EC2| metadata service. The |sdk-java| uses the :aws-java-class:`InstanceProfileCredentialsProvider ` to load these credentials. You can specify the IP address for this value. @@ -69,6 +70,7 @@ class. The default credential provider chain looks for credentials in this order :aws-java-class:`EC2ContainerCredentialsProviderWrapper ` for more information. +#. **Web Identity Token credentials** from the environment or container. Setting Credentials ------------------- From 4afd628e34689018c1d9909ad213de7bda0ab446 Mon Sep 17 00:00:00 2001 From: scmacdon Date: Thu, 9 Jan 2020 21:21:53 -0500 Subject: [PATCH 117/139] added additional info --- doc_source/java-dg-roles.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc_source/java-dg-roles.rst b/doc_source/java-dg-roles.rst index ffafc22..82f1fec 100644 --- a/doc_source/java-dg-roles.rst +++ b/doc_source/java-dg-roles.rst @@ -40,7 +40,9 @@ for credentials using the :emphasis:`default credentials provider chain`, in the 5. In the :emphasis:`instance profile credentials`, which exist within the instance metadata associated with the IAM role for the EC2 instance. -The final step in the default provider chain is available only when running your application on an +6. Web Identity Token credentials from the environment or container. + +The :emphasis:`instance profile credentials` step in the default provider chain is available only when running your application on an |EC2| instance, but provides the greatest ease of use and best security when working with |EC2| instances. You can also pass an :aws-java-class:`InstanceProfileCredentialsProvider ` instance directly to the client constructor to get From be848e56db1d0e629ac2714f9e1d8e1e07e479c0 Mon Sep 17 00:00:00 2001 From: scmacdon Date: Thu, 23 Jan 2020 11:20:46 -0500 Subject: [PATCH 118/139] updated file --- doc_source/examples-sqs-messages.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc_source/examples-sqs-messages.rst b/doc_source/examples-sqs-messages.rst index 67aa64e..d4427c9 100644 --- a/doc_source/examples-sqs-messages.rst +++ b/doc_source/examples-sqs-messages.rst @@ -45,6 +45,7 @@ Add a single message to an |SQS| queue by calling the |sqsclient| client's :dedent: 8 :language: java +See the :sdk-examples-java-sqs:`complete example ` on GitHub. .. _sqs-messages-send-multiple: From 32caab7fb5b1257ab6fa63c7e4ee1b7e9c75a75e Mon Sep 17 00:00:00 2001 From: scmacdon Date: Mon, 9 Mar 2020 16:37:58 -0400 Subject: [PATCH 119/139] minor change --- doc_source/examples-iam.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_source/examples-iam.rst b/doc_source/examples-iam.rst index 92005a0..46500e3 100644 --- a/doc_source/examples-iam.rst +++ b/doc_source/examples-iam.rst @@ -16,7 +16,7 @@ :description: Programming AWS Identity and Access Management using the AWS SDK for Java :keywords: AWS SDK for Java code examples, IAM -This section provides examples of programming |iam|_ using the |sdk-java|_. +This section provides examples of programming |iam|_ by using the |sdk-java|_. .. include:: common/desc-iam.txt From 9f0bdd5854d47a071b31fffdb4eb2b0a5591d411 Mon Sep 17 00:00:00 2001 From: Scott Macdonald <57190223+scmacdon@users.noreply.github.com> Date: Fri, 13 Mar 2020 13:29:23 -0400 Subject: [PATCH 120/139] Create java-tls.rst add new file --- doc_source/java-tls.rst | 64 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 doc_source/java-tls.rst diff --git a/doc_source/java-tls.rst b/doc_source/java-tls.rst new file mode 100644 index 0000000..f680ee8 --- /dev/null +++ b/doc_source/java-tls.rst @@ -0,0 +1,64 @@ +.. Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 + International License (the "License"). You may not use this file except in compliance with the + License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. + + This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + either express or implied. See the License for the specific language governing permissions and + limitations under the License. + +##################################### +Java SDK TLS 1.2 +##################################### + +.. meta:: + :description: Applies to Java SSL implementation (default SSL implementation in the SDK)Learn how the AWS shared responsibility model applies to data protection in this AWS product or service. + :keywords: + +The following information only applies to Java SSL implementation (default SSL implementation in the SDK). If you are using a different SSL implementations, you need to +look at your specific ssl implementation for how to enforce tls versions. + +TLS support in Java +=================== +TLS 1.2 is supported starting from Java 7. + +How to check TLS version +======================== +To check what TLS version is supported in your JVM, you can use the following code. + +.. code-block:: java + + System*.out.println(*Arrays*.toString(*SSLContext*.getDefault().getSupportedSSLParameters().getProtocols())); + +To see the SSL handshake in action and what version of TLS is used, you can use the system property **javax.net.debug**. + +.. code-block:: java + + java app.jar -Djavax.net.debug=ssl + +How to set TLS version +====================== + +**AWS Java SDK 1.x** + +* Apache http client: the SDK always prefers TLS 1.2 if it's supported in the platform. + +**AWS Java SDK 2.x** + +* ApacheHttpClient: the SDK always prefers TLS 1.2 if it's supported in the platform. + +* UrlHttpConnectionClient: + * To enforce only tls 1.2, using the system property + +.. code-block:: java + + java app.jar -Djdk.tls.client.protocols=TLSv1.2 + +or in code + +.. code-block:: java + + System.setProperty("jdk.tls.client.protocols", "TLSv1.2"); + +* NettyNioHttpClient: The SDK dependency Netty by default always prefers TLS 1.2 if it's supported in the platform. From 4cc6d7af8bf0db46199fb79e09f61f0b8cd85988 Mon Sep 17 00:00:00 2001 From: scmacdon Date: Fri, 13 Mar 2020 13:36:19 -0400 Subject: [PATCH 121/139] update file --- doc_source/security.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc_source/security.rst b/doc_source/security.rst index 827ac76..07691e7 100644 --- a/doc_source/security.rst +++ b/doc_source/security.rst @@ -25,6 +25,7 @@ Security for |SERVICENAMETITLE| :titlesonly: Data Protection + Java SDK TLS 1.2 Identity and Access Management Compliance Validation Resilience From 352d6f4b8b8725ab011135ae2b0155f28c25f57b Mon Sep 17 00:00:00 2001 From: Carey Burgess Date: Thu, 19 Mar 2020 12:32:17 -0700 Subject: [PATCH 122/139] update to security section --- doc_source/java-tls.rst | 37 ++++++++++++++++++------------------- doc_source/security.rst | 2 +- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/doc_source/java-tls.rst b/doc_source/java-tls.rst index f680ee8..68d9899 100644 --- a/doc_source/java-tls.rst +++ b/doc_source/java-tls.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the @@ -9,23 +9,23 @@ limitations under the License. ##################################### -Java SDK TLS 1.2 +AWS SDK for Java support for TLS 1.2 ##################################### .. meta:: - :description: Applies to Java SSL implementation (default SSL implementation in the SDK)Learn how the AWS shared responsibility model applies to data protection in this AWS product or service. + :description: Applies to Java SSL implementation (default SSL implementation in the SDK). Learn how the AWS shared responsibility model applies to data protection in this AWS product or service. :keywords: -The following information only applies to Java SSL implementation (default SSL implementation in the SDK). If you are using a different SSL implementations, you need to -look at your specific ssl implementation for how to enforce tls versions. +The following information applies only to Java SSL implementation (the default SSL implementation in the AWS SDK for Java). If you're using a different SSL implementation, +see your specific SSL implementation to learn how to enforce TLS versions. TLS support in Java =================== -TLS 1.2 is supported starting from Java 7. +TLS 1.2 is supported starting in Java 7. -How to check TLS version -======================== -To check what TLS version is supported in your JVM, you can use the following code. +How to check the TLS version +============================ +To check what TLS version is supported in your Java virtual machine (JVM), you can use the following code. .. code-block:: java @@ -37,28 +37,27 @@ To see the SSL handshake in action and what version of TLS is used, you can use java app.jar -Djavax.net.debug=ssl -How to set TLS version -====================== +How to set the TLS version +========================== -**AWS Java SDK 1.x** +**AWS SDK for Java 1.x** -* Apache http client: the SDK always prefers TLS 1.2 if it's supported in the platform. +* Apache HTTP client: The SDK always prefers TLS 1.2 (if it's supported in the platform). -**AWS Java SDK 2.x** +**AWS SDK for Java 2.x** -* ApacheHttpClient: the SDK always prefers TLS 1.2 if it's supported in the platform. +* ApacheHttpClient: The SDK always prefers TLS 1.2 (if it's supported in the platform). -* UrlHttpConnectionClient: - * To enforce only tls 1.2, using the system property +* UrlHttpConnectionClient: To enforce only TLS 1.2, you can use this Java command. .. code-block:: java java app.jar -Djdk.tls.client.protocols=TLSv1.2 -or in code +Or use this code. .. code-block:: java System.setProperty("jdk.tls.client.protocols", "TLSv1.2"); -* NettyNioHttpClient: The SDK dependency Netty by default always prefers TLS 1.2 if it's supported in the platform. +* NettyNioHttpClient: The SDK dependency for Netty is TLS 1.2 (if it's supported in the platform). diff --git a/doc_source/security.rst b/doc_source/security.rst index 07691e7..3a2e39f 100644 --- a/doc_source/security.rst +++ b/doc_source/security.rst @@ -25,7 +25,7 @@ Security for |SERVICENAMETITLE| :titlesonly: Data Protection - Java SDK TLS 1.2 + Enforcing TLS 1.2 Identity and Access Management Compliance Validation Resilience From 0a7b4cce5d1ce5d05c16c01220088d362bb5e95c Mon Sep 17 00:00:00 2001 From: Carey Burgess Date: Thu, 19 Mar 2020 12:36:19 -0700 Subject: [PATCH 123/139] minor repo cleanup --- doc_source/{java-tls.rst => security-java-tls.rst} | 0 doc_source/security.rst | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename doc_source/{java-tls.rst => security-java-tls.rst} (100%) diff --git a/doc_source/java-tls.rst b/doc_source/security-java-tls.rst similarity index 100% rename from doc_source/java-tls.rst rename to doc_source/security-java-tls.rst diff --git a/doc_source/security.rst b/doc_source/security.rst index 3a2e39f..34d0c04 100644 --- a/doc_source/security.rst +++ b/doc_source/security.rst @@ -25,7 +25,7 @@ Security for |SERVICENAMETITLE| :titlesonly: Data Protection - Enforcing TLS 1.2 + Enforcing TLS 1.2 Identity and Access Management Compliance Validation Resilience From 878d8f2383cb7c29d34d27225c59e7ab51103bc8 Mon Sep 17 00:00:00 2001 From: Carey Burgess Date: Mon, 13 Apr 2020 18:33:14 -0700 Subject: [PATCH 124/139] updating Gradle setup instructions --- doc_source/setup-project-gradle.rst | 90 ++++++++++++++++++----------- 1 file changed, 55 insertions(+), 35 deletions(-) diff --git a/doc_source/setup-project-gradle.rst b/doc_source/setup-project-gradle.rst index 1f36d79..c946f23 100644 --- a/doc_source/setup-project-gradle.rst +++ b/doc_source/setup-project-gradle.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the @@ -12,41 +12,52 @@ Using the SDK with Gradle ######################### + +Project setup for Gradle 4.6 or higher +=============== + `Since Gradle 4.6 `_ it is possible to use Gradle's improved POM support feature for importing bill of materials (BOM) files by simply declaring a dependency on a BOM. -.. topic:: To configure the SDK for Gradle 4.6 and upper +To manage SDK dependencies for your Gradle_ project, import the |sdk-java|'s Maven Bill of Materials (BOM) into the :file:`build.gradle` file. + +.. note:: Replace *1.11.X* in the build file examples below with a valid version of the |sdk-java|. Find the latest version in the + `AWS SDK for Java 1.11.x Reference `_ + - #. Enable `IMPROVED_POM_SUPPORT` feature in :file:`settings.gradle` file (not needed in Gradle 5 and upper) +.. topic:: To configure the |sdk-java| for Gradle 4.6 or higher: + + #. If you are using Gradle 5.0 or higher, skip to Step 2. Otherwise, enable the `IMPROVED_POM_SUPPORT` feature in the :file:`settings.gradle` file .. code-block:: groovy enableFeaturePreview('IMPROVED_POM_SUPPORT') - #. Import BOM as a usual dependency in the *dependencies* section + #. Add the BOM to the *dependencies* section of the :file:`build.gradle` file. .. code-block:: groovy + ... dependencies { - implementation platform('com.amazonaws:aws-java-sdk-bom:1.11.228') + implementation platform('com.amazonaws:aws-java-sdk-bom:1.11.X') + + // Declare individual SDK dependencies without version + ... } - #. Specify the SDK modules that you'll be using in the *dependencies* section + #. Specify the SDK modules you want to use in the *dependencies* section. For example, the following includes a dependency for |S3long|. .. code-block:: groovy + ... dependencies { implementation 'com.amazonaws:aws-java-sdk-s3' - testCompile group: 'junit', name: 'junit', version: '4.11' + ... } -Gradle will automatically resolve the correct version of your SDK dependencies using the information -from the BOM. - -You can also refer to the *AWS Code Catalog* to learn what dependencies to use for a given AWS service. Refer to the POM file under a specific service example. -For example, if you are interested in the dependencies for the AWS S3 service (as shown in the previous dependencies example), see the :sdk-examples-java-s3:`complete example ` on GitHub. (Look at the pom under /java/example_code/s3). +Gradle automatically resolves the correct version of your SDK dependencies using the information from the BOM. -Here's the complete :file:`build.gradle` file: +The following is an example of a complete :file:`build.gradle` file that includes a dependency for |S3|: .. code-block:: groovy @@ -62,18 +73,27 @@ Here's the complete :file:`build.gradle` file: } dependencies { - implementation platform('com.amazonaws:aws-java-sdk-bom:1.11.228') - implementation 'com.amazonaws:aws-java-sdk-s3' - testCompile group: 'junit', name: 'junit', version: '4.11' + implementation platform('com.amazonaws:aws-java-sdk-bom:1.11.X') + implementation 'com.amazonaws:aws-java-sdk-s3' + testCompile group: 'junit', name: 'junit', version: '4.11' } -Gradle versions prior to 4.6 lack of native BOM support, so Spring's `dependency management plugin -`_ for Gradle can be used -to import the SDK's Maven Bill of Materials (BOM) to manage SDK dependencies for your project. +.. note:: Replace the dependency for |S3| above with the dependency or dependencies of the Amazon service(s) you will be using in your project. The modules (dependencies) that are managed by the |sdk-java| BOM are listed on Maven Central (https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-bom/latest). + + +Project setup for Gradle versions prior to 4.6 +=============== + +Gradle versions prior to 4.6 lack native BOM support. To manage |sdk-java| dependencies for your project, +use Spring's `dependency management plugin +`_ for Gradle to import the SDK's Maven Bill of Materials (BOM). -.. topic:: To configure the SDK for Gradle prior 4.6 +.. note:: Replace *1.11.X* in the build file examples below with a valid version of the |sdk-java|. Find the latest version in the + `AWS SDK for Java 1.11.x Reference `_ - #. Add the dependency management plugin to your :file:`build.gradle` file +.. topic:: To configure the SDK for Gradle versions prior to 4.6: + + #. Add the dependency management plugin to your :file:`build.gradle` file. .. code-block:: groovy @@ -82,40 +102,38 @@ to import the SDK's Maven Bill of Materials (BOM) to manage SDK dependencies for mavenCentral() } dependencies { - classpath "io.spring.gradle:dependency-management-plugin:1.0.3.RELEASE" + classpath "io.spring.gradle:dependency-management-plugin:1.0.9.RELEASE" } } apply plugin: "io.spring.dependency-management" - #. Add the BOM to the *dependencyManagement* section of the file + #. Add the BOM to the *dependencyManagement* section of the file. .. code-block:: groovy dependencyManagement { imports { - mavenBom 'com.amazonaws:aws-java-sdk-bom:1.11.228' + mavenBom 'com.amazonaws:aws-java-sdk-bom:1.11.X' } } - #. Specify the SDK modules that you'll be using in the *dependencies* section + #. Specify the SDK modules that you'll be using in the *dependencies* section. For example, the following includes a dependency for |S3long|. .. code-block:: groovy dependencies { compile 'com.amazonaws:aws-java-sdk-s3' - testCompile group: 'junit', name: 'junit', version: '4.11' } -Gradle will automatically resolve the correct version of your SDK dependencies using the information -from the BOM. +Gradle automatically resolves the correct version of your SDK dependencies using the information from the BOM. -Here's the complete :file:`build.gradle` file: +The following is an example of a complete :file:`build.gradle` file that includes a dependency for |S3|: .. code-block:: groovy group 'aws.test' - version '1.0-SNAPSHOT' + version '1.0' apply plugin: 'java' @@ -127,10 +145,10 @@ Here's the complete :file:`build.gradle` file: buildscript { repositories { - mavenCentral() + mavenCentral() } dependencies { - classpath "io.spring.gradle:dependency-management-plugin:1.0.3.RELEASE" + classpath "io.spring.gradle:dependency-management-plugin:1.0.9.RELEASE" } } @@ -138,7 +156,7 @@ Here's the complete :file:`build.gradle` file: dependencyManagement { imports { - mavenBom 'com.amazonaws:aws-java-sdk-bom:1.11.228' + mavenBom 'com.amazonaws:aws-java-sdk-bom:1.11.X' } } @@ -147,5 +165,7 @@ Here's the complete :file:`build.gradle` file: testCompile group: 'junit', name: 'junit', version: '4.11' } -.. note:: For more detail about specifying SDK dependencies using the BOM, see - :doc:`setup-project-maven`. +.. note:: Replace the dependency for |S3| above with the dependency or dependencies of the Amazon service(s) you will be using in your project. The modules (dependencies) that are managed by the |sdk-java| BOM are listed on Maven Central (https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-bom/latest). + +For more detail about specifying SDK dependencies using the BOM, see +:doc:`setup-project-maven`. From 6780b657638f8b560ba2208f61f07b007f66d324 Mon Sep 17 00:00:00 2001 From: Carey Burgess Date: Tue, 14 Apr 2020 13:22:06 -0700 Subject: [PATCH 125/139] minor reorganization --- doc_source/java-dg-samples.rst | 2 +- doc_source/prog-services-sts.rst | 19 +++---------------- doc_source/prog-services.rst | 5 ++--- doc_source/setup-credentials.rst | 6 ++++++ 4 files changed, 12 insertions(+), 20 deletions(-) diff --git a/doc_source/java-dg-samples.rst b/doc_source/java-dg-samples.rst index 73aacf2..343550d 100644 --- a/doc_source/java-dg-samples.rst +++ b/doc_source/java-dg-samples.rst @@ -9,7 +9,7 @@ limitations under the License. ####################### -|sdk-java| Code Samples +Code Samples included with the SDK ####################### The |sdk-java| comes packaged with code samples that demonstrate many of the features of diff --git a/doc_source/prog-services-sts.rst b/doc_source/prog-services-sts.rst index bbf4721..a7cd288 100644 --- a/doc_source/prog-services-sts.rst +++ b/doc_source/prog-services-sts.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the @@ -66,25 +66,12 @@ Retrieve temporary security credentials from |STS| .. code-block:: java - AWSSecurityTokenService sts_client = new AWSSecurityTokenServiceClientBuilder().standard().withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration("sts-endpoint.amazonaws.com", "signing-region")).build() + AWSSecurityTokenServiceClientBuilder sts_client = new AWSSecurityTokenServiceClientBuilder().standard().withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration("sts-endpoint.amazonaws.com", "signing-region")).build() - When creating the client with no arguments (:code:`AWSSecurityTokenServiceClient sts_client = new AWSSecurityTokenServiceClientBuilder().standard().build();`), the default credential provider chain is used to + When creating the client with no arguments (:code:`AWSSecurityTokenServiceClientBuilder sts_client = new AWSSecurityTokenServiceClientBuilder().standard().build();`), the default credential provider chain is used to retrieve credentials. You can provide a specific credential provider if you want. For more information, see Providing AWS Credentials in the AWS SDK for Java. - #. :emphasis:`Optional`; requires that you have activated the region) Set the endpoint for the - STS client: - - .. code-block:: java - - sts_client.setEndpoint("sts-endpoint.amazonaws.com"); - - where :emphasis:`sts-endpoint` represents the STS endpoint for your region. - - .. important:: Do not use the :methodname:`setRegion` method to set a regional endpoint - |mdash| for backwards compatibility, that method continues to use the single global - endpoint of sts.amazonaws.com. - #. Create a :aws-java-class:`GetSessionTokenRequest ` object, and optionally set the duration in seconds for which the temporary credentials are valid: diff --git a/doc_source/prog-services.rst b/doc_source/prog-services.rst index 722f3c5..995b1b3 100644 --- a/doc_source/prog-services.rst +++ b/doc_source/prog-services.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the @@ -35,7 +35,6 @@ In 2018, AWS released |sdk-java| v2. For more AWS examples, see the `AWS SDK for :maxdepth: 1 :titlesonly: - SDK Code Samples Amazon CloudWatch Examples Amazon DynamoDB Examples Amazon EC2 Examples @@ -44,5 +43,5 @@ In 2018, AWS released |sdk-java| v2. For more AWS examples, see the `AWS SDK for Amazon Pinpoint Examples Amazon S3 Examples Amazon SQS Examples - prog-services-sts Amazon SWF Examples + Code Samples included with the SDK diff --git a/doc_source/setup-credentials.rst b/doc_source/setup-credentials.rst index 127b3b3..7042377 100644 --- a/doc_source/setup-credentials.rst +++ b/doc_source/setup-credentials.rst @@ -92,3 +92,9 @@ You can use similar techniques to setting credentials to set your default AWS re .. The following file is in the shared content at https://github.com/awsdocs/aws-doc-shared-content .. include:: common/sdk-shared-region.txt + +.. toctree:: + :maxdepth: 1 + :titlesonly: + + prog-services-sts \ No newline at end of file From 415f3349ea1e82843f1bd635ce6490a980398921 Mon Sep 17 00:00:00 2001 From: Carey Burgess Date: Tue, 14 Apr 2020 13:24:00 -0700 Subject: [PATCH 126/139] replaced deprecated method --- doc_source/java-dg-region-selection.rst | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/doc_source/java-dg-region-selection.rst b/doc_source/java-dg-region-selection.rst index de6e25c..e6a1ae0 100644 --- a/doc_source/java-dg-region-selection.rst +++ b/doc_source/java-dg-region-selection.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright 2010-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the @@ -79,14 +79,19 @@ Choosing a Specific Endpoint ============================ Each AWS client can be configured to use a *specific endpoint* within a region by calling the -:methodname:`setEndpoint` method. +:methodname:`withEndpointConfiguration` method when creating the client. -For example, to configure the |EC2| client to use the |euwest1-name|, use the following code. +For example, to configure the |S3| client to use the |euwest1-name|, use the following code. :: - AmazonEC2 ec2 = new AmazonEC2(myCredentials); - ec2.setEndpoint("https://ec2.eu-west-1.amazonaws.com"); + AmazonS3 s3 = AmazonS3ClientBuilder.standard() + .withEndpointConfiguration(new EndpointConfiguration( + "https://s3.eu-west-1.amazonaws.com", + "eu-west-1")) + .withCredentials(CREDENTIALS_PROVIDER) + .build(); + See |regions-and-endpoints|_ for the current list of regions and their corresponding endpoints for all AWS services. From 54abf885786b862cf2af7c5dadf7e32ac9a1b1c2 Mon Sep 17 00:00:00 2001 From: Carey Burgess Date: Sun, 19 Apr 2020 16:02:19 -0700 Subject: [PATCH 127/139] fixes based on customer feedback --- doc_source/sdk-metrics.rst | 36 +++++++++---------- doc_source/setup-project-gradle.rst | 55 +++++++++++++++-------------- 2 files changed, 47 insertions(+), 44 deletions(-) diff --git a/doc_source/sdk-metrics.rst b/doc_source/sdk-metrics.rst index 66df031..ef87fca 100755 --- a/doc_source/sdk-metrics.rst +++ b/doc_source/sdk-metrics.rst @@ -62,30 +62,14 @@ Enabling |SDKM| is independent of configuring your credentials to use an AWS ser You can enable |SDKM| using one of 4 options. -* :ref:`csm-enable-agent-code` * :ref:`csm-enable-agent-environ` +* :ref:`csm-enable-agent-code` * :ref:`csm-enable-agent-java-prop` * :ref:`csm-enable-agent-shared-config` -.. _csm-enable-agent-code: - -Option 1: Set |SDKM| in Code ----------------------------- - -The |language| implementation allows you to set |SDKM| configurations within code when building -a service client. -The values set in code override any configurations set in the other options described below. - -.. code-block:: java - - CsmConfiguration csmConfig = new CsmConfiguration(true, MY_PORT, MY_CLIENT_ID); - AmazonDynamoDB dynamodb = AmazonDynamoDBClientBuilder.standard() - .withClientSideMonitoringConfigurationProvider(new StaticCsmConfigurationProvider(csmConfig)) - .build(); - .. _csm-enable-agent-environ: -Option 2: Set Environment Variables +Option 1: Set Environment Variables ----------------------------------- If :code:`AWS_CSM_ENABLED` is not set, the SDK first checks the profile specified in @@ -102,6 +86,22 @@ To turn on |SDKM|, add the following to your environmental variables. Note: Enabling |SDKM| does not configure your credentials to use an AWS service. +.. _csm-enable-agent-code: + +Option 2: Set |SDKM| in Code +---------------------------- + +The |language| implementation allows you to set |SDKM| configurations within code when building +a service client. +The values set in code override any configurations set in the other options described below. + +.. code-block:: java + + CsmConfiguration csmConfig = new CsmConfiguration(true, MY_PORT, MY_CLIENT_ID); + AmazonDynamoDB dynamodb = AmazonDynamoDBClientBuilder.standard() + .withClientSideMonitoringConfigurationProvider(new StaticCsmConfigurationProvider(csmConfig)) + .build(); + .. _csm-enable-agent-java-prop: Option 3: Set Java System Property diff --git a/doc_source/setup-project-gradle.rst b/doc_source/setup-project-gradle.rst index c946f23..aa12322 100644 --- a/doc_source/setup-project-gradle.rst +++ b/doc_source/setup-project-gradle.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the @@ -13,21 +13,27 @@ Using the SDK with Gradle ######################### -Project setup for Gradle 4.6 or higher -=============== +.. meta:: + :description: How to use Gradle to set up your AWS SDK for Java project + :keywords: AWS SDK for Java, Gradle, BOM, install, download, setup + + +To manage SDK dependencies for your Gradle_ project, import the Maven BOM for the |sdk-java| into the :file:`build.gradle` file. -`Since Gradle 4.6 `_ it is possible to -use Gradle's improved POM support feature for importing bill of materials (BOM) files by simply declaring a dependency on a BOM. +.. note:: In the following examples, replace *1.11.X* in the build file with a valid version of the |sdk-java|. Find the latest version in the + `AWS SDK for Java 1.11.x Reference `_. -To manage SDK dependencies for your Gradle_ project, import the |sdk-java|'s Maven Bill of Materials (BOM) into the :file:`build.gradle` file. -.. note:: Replace *1.11.X* in the build file examples below with a valid version of the |sdk-java|. Find the latest version in the - `AWS SDK for Java 1.11.x Reference `_ +Project setup for Gradle 4.6 or higher +=============== +`Since Gradle 4.6 `_, you can +use Gradle's improved POM support feature for importing bill of materials (BOM) files by declaring a dependency on a BOM. -.. topic:: To configure the |sdk-java| for Gradle 4.6 or higher: - #. If you are using Gradle 5.0 or higher, skip to Step 2. Otherwise, enable the `IMPROVED_POM_SUPPORT` feature in the :file:`settings.gradle` file +.. topic:: To configure the |sdk-java| for Gradle 4.6 or later + + #. If you're using Gradle 5.0 or later, skip to step 2. Otherwise, enable the *IMPROVED_POM_SUPPORT* feature in the :file:`settings.gradle` file. .. code-block:: groovy @@ -45,7 +51,7 @@ To manage SDK dependencies for your Gradle_ project, import the |sdk-java|'s Mav ... } - #. Specify the SDK modules you want to use in the *dependencies* section. For example, the following includes a dependency for |S3long|. + #. Specify the SDK modules to use in the *dependencies* section. For example, the following includes a dependency for |S3long| (|S3|). .. code-block:: groovy @@ -55,9 +61,9 @@ To manage SDK dependencies for your Gradle_ project, import the |sdk-java|'s Mav ... } -Gradle automatically resolves the correct version of your SDK dependencies using the information from the BOM. +Gradle automatically resolves the correct version of your SDK dependencies by using the information from the BOM. -The following is an example of a complete :file:`build.gradle` file that includes a dependency for |S3|: +The following is an example of a complete :file:`build.gradle` file that includes a dependency for |S3|. .. code-block:: groovy @@ -78,20 +84,17 @@ The following is an example of a complete :file:`build.gradle` file that include testCompile group: 'junit', name: 'junit', version: '4.11' } -.. note:: Replace the dependency for |S3| above with the dependency or dependencies of the Amazon service(s) you will be using in your project. The modules (dependencies) that are managed by the |sdk-java| BOM are listed on Maven Central (https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-bom/latest). +.. note:: In the previous example, replace the dependency for |S3| with the dependencies of the AWS services you will use in your project. The modules (dependencies) that are managed by the |sdk-java| BOM are listed on Maven central repository (https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-bom/latest). -Project setup for Gradle versions prior to 4.6 +Project setup for Gradle versions earlier than 4.6 =============== -Gradle versions prior to 4.6 lack native BOM support. To manage |sdk-java| dependencies for your project, +Gradle versions earlier than 4.6 lack native BOM support. To manage |sdk-java| dependencies for your project, use Spring's `dependency management plugin -`_ for Gradle to import the SDK's Maven Bill of Materials (BOM). - -.. note:: Replace *1.11.X* in the build file examples below with a valid version of the |sdk-java|. Find the latest version in the - `AWS SDK for Java 1.11.x Reference `_ +`_ for Gradle to import the Maven BOM for the SDK. -.. topic:: To configure the SDK for Gradle versions prior to 4.6: +.. topic:: To configure the SDK for Gradle versions earlier than 4.6 #. Add the dependency management plugin to your :file:`build.gradle` file. @@ -118,7 +121,7 @@ use Spring's `dependency management plugin } } - #. Specify the SDK modules that you'll be using in the *dependencies* section. For example, the following includes a dependency for |S3long|. + #. Specify the SDK modules that you'll use in the *dependencies* section. For example, the following includes a dependency for |S3|. .. code-block:: groovy @@ -126,9 +129,9 @@ use Spring's `dependency management plugin compile 'com.amazonaws:aws-java-sdk-s3' } -Gradle automatically resolves the correct version of your SDK dependencies using the information from the BOM. +Gradle automatically resolves the correct version of your SDK dependencies by using the information from the BOM. -The following is an example of a complete :file:`build.gradle` file that includes a dependency for |S3|: +The following is an example of a complete :file:`build.gradle` file that includes a dependency for |S3|. .. code-block:: groovy @@ -165,7 +168,7 @@ The following is an example of a complete :file:`build.gradle` file that include testCompile group: 'junit', name: 'junit', version: '4.11' } -.. note:: Replace the dependency for |S3| above with the dependency or dependencies of the Amazon service(s) you will be using in your project. The modules (dependencies) that are managed by the |sdk-java| BOM are listed on Maven Central (https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-bom/latest). +.. note:: In the previous example, replace the dependency for |S3| with the dependencies of the AWS service you will use in your project. The modules (dependencies) that are managed by the |sdk-java| BOM are listed on Maven central repository (https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-bom/latest). -For more detail about specifying SDK dependencies using the BOM, see +For more information about specifying SDK dependencies by using the BOM, see :doc:`setup-project-maven`. From 908a6804830a488264152fc1ec6df5f6bff08495 Mon Sep 17 00:00:00 2001 From: Carey Burgess Date: Tue, 21 Apr 2020 12:55:34 -0700 Subject: [PATCH 128/139] typo --- doc_source/section-client-configuration.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_source/section-client-configuration.rst b/doc_source/section-client-configuration.rst index a552071..70fc1e8 100644 --- a/doc_source/section-client-configuration.rst +++ b/doc_source/section-client-configuration.rst @@ -119,7 +119,7 @@ Large buffer sizes (e.g., 2 MB) allow the operating system to buffer more data i requiring the remote server to acknowledge receipt of that information, and so can be particularly useful when the network has high latency. -This is only a *hint*, and the operating system might not to honor it. When using this option, users +This is only a *hint*, and the operating system might not honor it. When using this option, users should always check the operating system's configured limits and defaults. Most operating systems have a maximum TCP buffer size limit configured, and won't let you go beyond that limit unless you explicitly raise the maximum TCP buffer size limit. From 3c4707a05f1d174bd0d8dce785d52926ef4ac307 Mon Sep 17 00:00:00 2001 From: Carey Burgess Date: Sat, 25 Apr 2020 17:49:43 -0700 Subject: [PATCH 129/139] customer feedback; fixing code error --- doc_source/prog-services-sts.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc_source/prog-services-sts.rst b/doc_source/prog-services-sts.rst index a7cd288..f82ecb5 100644 --- a/doc_source/prog-services-sts.rst +++ b/doc_source/prog-services-sts.rst @@ -66,9 +66,9 @@ Retrieve temporary security credentials from |STS| .. code-block:: java - AWSSecurityTokenServiceClientBuilder sts_client = new AWSSecurityTokenServiceClientBuilder().standard().withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration("sts-endpoint.amazonaws.com", "signing-region")).build() + AWSSecurityTokenService sts_client = new AWSSecurityTokenServiceClientBuilder().standard().withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration("sts-endpoint.amazonaws.com", "signing-region")).build() - When creating the client with no arguments (:code:`AWSSecurityTokenServiceClientBuilder sts_client = new AWSSecurityTokenServiceClientBuilder().standard().build();`), the default credential provider chain is used to + When creating the client with no arguments (:code:`AWSSecurityTokenService sts_client = new AWSSecurityTokenServiceClientBuilder().standard().build();`), the default credential provider chain is used to retrieve credentials. You can provide a specific credential provider if you want. For more information, see Providing AWS Credentials in the AWS SDK for Java. From 7de170fd15e6ea82b699a45ad3116f2fbbab3f59 Mon Sep 17 00:00:00 2001 From: Carey Burgess Date: Wed, 6 May 2020 10:38:10 -0700 Subject: [PATCH 130/139] fix broken links --- doc_source/data-protection.rst | 2 +- doc_source/security.rst | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc_source/data-protection.rst b/doc_source/data-protection.rst index c315926..185e987 100644 --- a/doc_source/data-protection.rst +++ b/doc_source/data-protection.rst @@ -29,7 +29,7 @@ For data protection purposes, we recommend that you protect |AWS| account creden you secure your data in the following ways: * Use multi-factor authentication (MFA) with each account. -* Use SSL/TLS to communicate with |AWS| resources. +* Use SSL/TLS to communicate with |AWS| resources. To use a minimum TLS version of 1.2, see `Enforcing TLS 1.2 `_. * Set up API and user activity logging with |CTlong|. * Use |AWS| encryption solutions, along with all default security controls within |AWS| services. * Use advanced managed security services such as |MCElong|, which assists in discovering and securing personal data that diff --git a/doc_source/security.rst b/doc_source/security.rst index 34d0c04..ac8c981 100644 --- a/doc_source/security.rst +++ b/doc_source/security.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the @@ -26,7 +26,7 @@ Security for |SERVICENAMETITLE| Data Protection Enforcing TLS 1.2 - Identity and Access Management - Compliance Validation - Resilience - Infrastructure Security + Identity and Access Management security-iam> + Compliance Validation + Resilience + Infrastructure Security From 5ffc174fbd7c0b20f2e7a7e48937c1290b990d8a Mon Sep 17 00:00:00 2001 From: Carey Burgess Date: Wed, 6 May 2020 10:39:33 -0700 Subject: [PATCH 131/139] fix broken links --- doc_source/compliance-validation.rst | 58 +++++++++++++++++++++ doc_source/disaster-recovery-resiliency.rst | 29 +++++++++++ doc_source/infrastructure-security.rst | 12 +++++ doc_source/security-iam.rst | 33 ++++++++++++ 4 files changed, 132 insertions(+) create mode 100644 doc_source/compliance-validation.rst create mode 100644 doc_source/disaster-recovery-resiliency.rst create mode 100644 doc_source/infrastructure-security.rst create mode 100644 doc_source/security-iam.rst diff --git a/doc_source/compliance-validation.rst b/doc_source/compliance-validation.rst new file mode 100644 index 0000000..f3ea15b --- /dev/null +++ b/doc_source/compliance-validation.rst @@ -0,0 +1,58 @@ +Compliance Validation for this AWS Product or Service +===================================================== + +This AWS product or service follows the `shared responsibility +model `__ +through the specific Amazon Web Services (AWS) services it supports. For +AWS service security information, see the `AWS service security +documentation +page `__ +and `AWS services that are in scope of AWS compliance efforts by +compliance +program `__. + +The security and compliance of AWS services is assessed by third-party +auditors as part of multiple AWS compliance programs. These include SOC, +PCI, FedRAMP, HIPAA, and others. AWS provides a frequently updated list +of AWS services in scope of specific compliance programs at `AWS +Services in Scope by Compliance +Program `__. + +Third-party audit reports are available for you to download using AWS +Artifact. For more information, see `Downloading Reports in AWS +Artifact `__. + +For more information about AWS compliance programs, see `AWS Compliance +Programs `__. + +Your compliance responsibility when using this AWS product or service to +access an AWS service is determined by the sensitivity of your data, +your organization’s compliance objectives, and applicable laws and +regulations. If your use of an AWS service is subject to compliance with +standards such as HIPAA, PCI, or FedRAMP, AWS provides resources to +help: + + + `Security and Compliance Quick Start Guides + `__ + – Deployment guides that discuss architectural considerations and provide steps for + deploying security-focused and compliance-focused baseline environments on AWS. + + + + `Architecting for HIPAA Security and Compliance Whitepaper + `__ + – A whitepaper that describes how companies can use AWS to create + HIPAA-compliant applications. + + + + `AWS Compliance Resources `__ + – A collection of workbooks and guides that might apply to your industry and + location. + + + + `AWS Config `__ – A service that assesses how well your + resource configurations comply with internal practices, industry guidelines, and regulations. + + + + `AWS Security Hub `__ – A comprehensive view of + your security state within AWS that helps you check your compliance with + security industry standards and best practices. diff --git a/doc_source/disaster-recovery-resiliency.rst b/doc_source/disaster-recovery-resiliency.rst new file mode 100644 index 0000000..e4abd93 --- /dev/null +++ b/doc_source/disaster-recovery-resiliency.rst @@ -0,0 +1,29 @@ +Resilience for this AWS Product or Service +========================================== + +The Amazon Web Services (AWS) global infrastructure is built around AWS +Regions and Availability Zones. + +AWS Regions provide multiple physically separated and isolated +Availability Zones, which are connected with low-latency, +high-throughput, and highly redundant networking. + +With Availability Zones, you can design and operate applications and +databases that automatically fail over between Availability Zones +without interruption. Availability Zones are more highly available, +fault tolerant, and scalable than traditional single or multiple data +center infrastructures. + +For more information about AWS Regions and Availability Zones, see `AWS +Global +Infrastructure `__. + +This AWS product or service follows the `shared responsibility +model `__ +through the specific Amazon Web Services (AWS) services it supports. For +AWS service security information, see the `AWS service security +documentation +page `__ +and `AWS services that are in scope of AWS compliance efforts by +compliance +program `__. diff --git a/doc_source/infrastructure-security.rst b/doc_source/infrastructure-security.rst new file mode 100644 index 0000000..10e994e --- /dev/null +++ b/doc_source/infrastructure-security.rst @@ -0,0 +1,12 @@ +Infrastructure Security for this AWS Product or Service +======================================================= + +This AWS product or service follows the `shared responsibility +model `__ +through the specific Amazon Web Services (AWS) services it supports. For +AWS service security information, see the `AWS service security +documentation +page `__ +and `AWS services that are in scope of AWS compliance efforts by +compliance +program `__. diff --git a/doc_source/security-iam.rst b/doc_source/security-iam.rst new file mode 100644 index 0000000..65b77e6 --- /dev/null +++ b/doc_source/security-iam.rst @@ -0,0 +1,33 @@ +Identity and Access Management for this AWS Product or Service +============================================================== + +AWS Identity and Access Management (IAM) is an Amazon Web Services (AWS) +service that helps an administrator securely control access to AWS +resources. IAM administrators control who can be *authenticated* (signed +in) and *authorized* (have permissions) to use resources in AWS +services. IAM is an AWS service that you can use with no additional +charge. + +To use this AWS product or service to access AWS, you need an AWS +account and AWS credentials. To increase the security of your AWS +account, we recommend that you use an *IAM user* to provide access +credentials instead of using your AWS account credentials. + +For details about working with IAM, see `AWS Identity and Access +Management `__. + +For an overview of IAM users and why they are important for the security +of your account, see `AWS Security +Credentials `__ +in the `Amazon Web Services General +Reference `__. + +This AWS product or service follows the `shared responsibility +model `__ +through the specific Amazon Web Services (AWS) services it supports. For +AWS service security information, see the `AWS service security +documentation +page `__ +and `AWS services that are in scope of AWS compliance efforts by +compliance +program `__. From c158b32ac47684c6b4ad99801682d93e99cf8b94 Mon Sep 17 00:00:00 2001 From: Carey Burgess Date: Wed, 6 May 2020 10:49:08 -0700 Subject: [PATCH 132/139] minor change --- doc_source/security.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_source/security.rst b/doc_source/security.rst index ac8c981..978ff0d 100644 --- a/doc_source/security.rst +++ b/doc_source/security.rst @@ -26,7 +26,7 @@ Security for |SERVICENAMETITLE| Data Protection Enforcing TLS 1.2 - Identity and Access Management security-iam> + Identity and Access Management Compliance Validation Resilience Infrastructure Security From 95675ca9002e5eebf4a40b618f3f01350a8ca264 Mon Sep 17 00:00:00 2001 From: Carey Burgess Date: Tue, 12 May 2020 09:40:02 -0700 Subject: [PATCH 133/139] fix typo --- doc_source/examples-s3-transfermanager.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_source/examples-s3-transfermanager.rst b/doc_source/examples-s3-transfermanager.rst index 5828351..a3e62e7 100644 --- a/doc_source/examples-s3-transfermanager.rst +++ b/doc_source/examples-s3-transfermanager.rst @@ -45,7 +45,7 @@ Upload Files and Directories Upload a Single File -------------------- -Call the |xfermgr| :methodname:`upload` method, providing an |S3| +Call |xfermgr|'s :methodname:`upload` method, providing an |S3| bucket name, a key (object) name, and a standard Java :javase-ref:`File ` object that represents the file to upload. From acefbcb5ef67dd4ab39f7bf0f16e3fcc365fe27f Mon Sep 17 00:00:00 2001 From: Carey Burgess Date: Tue, 19 May 2020 22:39:49 -0700 Subject: [PATCH 134/139] fix code example; rst edits --- doc_source/examples-ec2-regions-zones.rst | 59 ++++++++++++----------- doc_source/setup-project-gradle.rst | 4 +- 2 files changed, 32 insertions(+), 31 deletions(-) diff --git a/doc_source/examples-ec2-regions-zones.rst b/doc_source/examples-ec2-regions-zones.rst index ea9de5c..ecde885 100644 --- a/doc_source/examples-ec2-regions-zones.rst +++ b/doc_source/examples-ec2-regions-zones.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the @@ -8,9 +8,9 @@ either express or implied. See the License for the specific language governing permissions and limitations under the License. -#################################### -Using Regions and Availability Zones -#################################### +################################## +Use regions and availability zones +################################## .. meta:: :description: How to list EC2 regions and availability zones using the AWS SDK for Java. @@ -18,8 +18,8 @@ Using Regions and Availability Zones zones, describe availability zones -Describing Regions -================== +Describe regions +================ To list the Regions available to your account, call the |ec2client|'s :methodname:`describeRegions` method. It returns a :aws-java-class:`DescribeRegionsResult @@ -29,22 +29,20 @@ each Region. **Imports** -.. literalinclude:: example_code/ec2/src/main/java/aws/example/ec2/DescribeRegionsAndZones.java - :lines: 16-19 +.. literalinclude:: ec2.java.describe_region_and_zones.import.txt :language: java **Code** -.. literalinclude:: example_code/ec2/src/main/java/aws/example/ec2/DescribeRegionsAndZones.java - :lines: 30-40 +.. literalinclude:: ec2.java1.describe_region_and_zones.regions.txt :dedent: 8 :language: java See the :sdk-examples-java-ec2:`complete example `. -Describing Availability Zones -============================= +Describe availability zones +=========================== To list each Availability Zone available to your account, call the |ec2client|'s :methodname:`describeAvailabilityZones` method. It returns a @@ -55,50 +53,53 @@ objects that represent each Availability Zone. **Imports** -.. literalinclude:: example_code/ec2/src/main/java/aws/example/ec2/DescribeRegionsAndZones.java - :lines: 16-19 +.. literalinclude:: ec2.java.describe_region_and_zones.import.txt :language: java **Code** -.. literalinclude:: example_code/ec2/src/main/java/aws/example/ec2/DescribeRegionsAndZones.java - :lines: 42-53 +.. literalinclude:: ec2.java1.describe_region_and_zones.zones.txt :dedent: 8 :language: java See the :sdk-examples-java-ec2:`complete example `. -Describing Accounts -================== +Describe accounts +================= To describe your account, call the |ec2client|'s :methodname:`describeAccountAttributes` -method. This method returns a :aws-java-class:`DescribeAccountAttributesResult ` object. -Invoke this objects :methodname:`getAccountAttributes` method to get a list of :aws-java-class:`AccountAttribute -` objects. You can iterate through the list to retrieve an +method. This method returns a +:aws-java-class:`DescribeAccountAttributesResult ` +object. +Invoke this objects :methodname:`getAccountAttributes` method to get a list of +:aws-java-class:`AccountAttribute ` objects. You can iterate +through the list to retrieve an :aws-java-class:`AccountAttribute ` object. -You can -get your account's attribute values by invoking the :aws-java-class:`AccountAttribute ` object's -:methodname:`getAttributeValues` method. This method returns a list of :aws-java-class:`AccountAttributeValue -` objects. You can iterate through this second list to display the value of attributes (see the following code example). +You can get your account's attribute values by invoking the +:aws-java-class:`AccountAttribute ` object's +:methodname:`getAttributeValues` method. This method returns a list of +:aws-java-class:`AccountAttributeValue ` objects. You can +iterate through this second list to display the value of attributes (see the following code +example). **Imports** -.. literalinclude:: ec2.java2.describe_region_and_zones.import.txt +.. literalinclude:: ec2.java1.describe_account.import.txt :language: java **Code** -.. literalinclude:: ec2.java2.describe_region_and_zones.region.txt +.. literalinclude:: ec2.java1.describe_account.main.txt :dedent: 8 :language: java -See the :sdk-examples-java-ec2:`complete example ` on GitHub. +See the :sdk-examples-java-ec2:`complete example ` on GitHub. -More Information +More information ================ * :ec2-ug:`Regions and Availability Zones ` in the |ec2-ug| diff --git a/doc_source/setup-project-gradle.rst b/doc_source/setup-project-gradle.rst index aa12322..a6d4dd6 100644 --- a/doc_source/setup-project-gradle.rst +++ b/doc_source/setup-project-gradle.rst @@ -25,7 +25,7 @@ To manage SDK dependencies for your Gradle_ project, import the Maven BOM for th Project setup for Gradle 4.6 or higher -=============== +====================================== `Since Gradle 4.6 `_, you can use Gradle's improved POM support feature for importing bill of materials (BOM) files by declaring a dependency on a BOM. @@ -88,7 +88,7 @@ The following is an example of a complete :file:`build.gradle` file that include Project setup for Gradle versions earlier than 4.6 -=============== +================================================== Gradle versions earlier than 4.6 lack native BOM support. To manage |sdk-java| dependencies for your project, use Spring's `dependency management plugin From f3f38e48cee8fefe6cb066ecafd7e253d8ded031 Mon Sep 17 00:00:00 2001 From: Carey Burgess Date: Wed, 20 May 2020 06:52:40 -0700 Subject: [PATCH 135/139] update import snippet tag --- doc_source/examples-ec2-regions-zones.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc_source/examples-ec2-regions-zones.rst b/doc_source/examples-ec2-regions-zones.rst index ecde885..568ae5e 100644 --- a/doc_source/examples-ec2-regions-zones.rst +++ b/doc_source/examples-ec2-regions-zones.rst @@ -29,7 +29,7 @@ each Region. **Imports** -.. literalinclude:: ec2.java.describe_region_and_zones.import.txt +.. literalinclude:: ec2.java1.describe_region_and_zones.import.txt :language: java **Code** @@ -53,7 +53,7 @@ objects that represent each Availability Zone. **Imports** -.. literalinclude:: ec2.java.describe_region_and_zones.import.txt +.. literalinclude:: ec2.java1.describe_region_and_zones.import.txt :language: java **Code** From 145c82df43f9eeed5f9d9498301e873ce4eb1c66 Mon Sep 17 00:00:00 2001 From: Carey Burgess Date: Wed, 8 Jul 2020 11:11:57 -0700 Subject: [PATCH 136/139] Update credentials chain order --- doc_source/credentials.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc_source/credentials.rst b/doc_source/credentials.rst index 758ad44..2d017ea 100644 --- a/doc_source/credentials.rst +++ b/doc_source/credentials.rst @@ -48,6 +48,8 @@ class. The default credential provider chain looks for credentials in this order The |sdk-java| uses the :aws-java-class:`SystemPropertiesCredentialsProvider ` to load these credentials. +#. **Web Identity Token credentials** from the environment or container. + #. **The default credential profiles file** |ndash| typically located at :file:`~/.aws/credentials` (location can vary per platform), and shared by many of the AWS SDKs and by the AWS CLI. The |sdk-java| uses the :aws-java-class:`ProfileCredentialsProvider ` to load these credentials. @@ -70,8 +72,6 @@ class. The default credential provider chain looks for credentials in this order :aws-java-class:`EC2ContainerCredentialsProviderWrapper ` for more information. -#. **Web Identity Token credentials** from the environment or container. - Setting Credentials ------------------- From d10c8fdbdd9710b3eec98cee7e50fa6550392a90 Mon Sep 17 00:00:00 2001 From: Carey Burgess Date: Mon, 10 Aug 2020 13:30:08 -0700 Subject: [PATCH 137/139] update gitignore --- doc_source/.gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc_source/.gitignore b/doc_source/.gitignore index 5193fae..4423b35 100644 --- a/doc_source/.gitignore +++ b/doc_source/.gitignore @@ -1 +1,3 @@ example_code +.vscode +_build \ No newline at end of file From c03e32c1b936ff06afc44b82a340fa7dada0fb33 Mon Sep 17 00:00:00 2001 From: Carey Burgess Date: Mon, 10 Aug 2020 13:40:52 -0700 Subject: [PATCH 138/139] Updates for the Amazon S3 Encryption Client This change includes fixes for issues that were reported by Sophie Schmieg from the Google ISE team, and for issues that were discovered by AWS Cryptography --- doc_source/examples-crypto-kms.rst | 132 +++++------ doc_source/examples-crypto-masterkey.rst | 126 ++++------- doc_source/examples-crypto.rst | 30 ++- doc_source/s3-encryption-migration.rst | 276 +++++++++++++++++++++++ doc_source/security.rst | 5 +- 5 files changed, 394 insertions(+), 175 deletions(-) create mode 100644 doc_source/s3-encryption-migration.rst diff --git a/doc_source/examples-crypto-kms.rst b/doc_source/examples-crypto-kms.rst index 68bc328..b0dc34d 100644 --- a/doc_source/examples-crypto-kms.rst +++ b/doc_source/examples-crypto-kms.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the @@ -9,7 +9,7 @@ limitations under the License. ################################################### -|S3| Client-Side Encryption with |KMS| Managed Keys +|S3| client-side encryption with |KMS| managed keys ################################################### .. meta:: @@ -17,7 +17,7 @@ :keywords: AWS SDK for Java code examples, cryptography, encryption The following examples use the -:aws-java-class:`AmazonS3EncryptionClientBuilder ` class +:aws-java-class:`AmazonS3EncryptionClientV2Builder ` class to create an |S3| client with client-side encryption enabled. Once configured, any objects you upload to |S3| using this client will be encrypted. Any objects you get from |S3| using this client are automatically @@ -28,61 +28,82 @@ decrypted. encryption with |KMS| managed keys. To learn how to use encryption with your own keys, see :doc:`examples-crypto-masterkey`. -You can choose from three encryption modes when enabling client-side |S3| encryption: encryption-only, -authenticated, and strict authenticated. +You can choose from two encryption modes when enabling client-side |S3| encryption: strict +authenticated or authenticated. The following sections show how to enable each type. To learn which algorithms each mode uses, see the :aws-java-class:`CryptoMode ` definition. -Required Imports +Required imports ================ Import the following classes for these examples. **Imports** -.. literalinclude:: s3.java1.s3_encrypt.import.txt - :language: java +.. code-block:: java + + import com.amazonaws.ClientConfiguration; + import com.amazonaws.regions.Regions; + import com.amazonaws.services.kms.AWSKMS; + import com.amazonaws.services.kms.AWSKMSClientBuilder; + import com.amazonaws.services.kms.model.GenerateDataKeyRequest; + import com.amazonaws.services.kms.model.GenerateDataKeyResult; + import com.amazonaws.services.s3.AmazonS3EncryptionClientV2Builder; + import com.amazonaws.services.s3.AmazonS3EncryptionV2; + import com.amazonaws.services.s3.model.CryptoConfigurationV2; + import com.amazonaws.services.s3.model.CryptoMode; + import com.amazonaws.services.s3.model.EncryptionMaterials; + import com.amazonaws.services.s3.model.KMSEncryptionMaterialsProvider; -.. _encryption-only-kms: +.. _strict-authenticated-encryption-kms: -Encryption-Only Mode -==================== +Strict authenticated encryption +=============================== -Encryption-only is the default mode, if no :classname:`CryptoMode` is specified. -To use an |KMS| -managed key for encryption, pass the |KMS| key ID or alias to the -:aws-java-class:`KMSEncryptionMaterialsProvider` constructor. +Strict authenticated encryption is the default mode if no :classname:`CryptoMode` is specified. + +To explicitly enable this mode, specify the :classname:`StrictAuthenticatedEncryption` value in the +:methodName:`withCryptoConfiguration` method. + +.. note:: To use client-side authenticated encryption, you must include the latest + `Bouncy Castle jar `_ file + in the classpath of your application. **Code** -.. literalinclude:: s3.java1.s3_encrypt.kms_encryption_only_build.txt - :dedent: 8 - :language: java +.. code-block:: java + + AmazonS3EncryptionV2 s3Encryption = AmazonS3EncryptionClientV2Builder.standard() + .withRegion(Regions.US_WEST_2) + .withCryptoConfiguration(new CryptoConfigurationV2().withCryptoMode((CryptoMode.StrictAuthenticatedEncryption))) + .withEncryptionMaterialsProvider(new KMSEncryptionMaterialsProvider(keyId)) + .build(); + + s3Encryption.putObject(bucket_name, ENCRYPTED_KEY3, "This is the 3rd content to encrypt with a key created in the AWS Console"); + System.out.println(s3Encryption.getObjectAsString(bucket_name, ENCRYPTED_KEY3)); Call the :methodname:`putObject` method on the |S3| encryption client to upload objects. **Code** -.. literalinclude:: s3.java1.s3_encrypt.kms_encryption_only_put_object.txt - :dedent: 8 - :language: java +.. code-block:: java + + s3Encryption.putObject(bucket_name, ENCRYPTED_KEY3, "This is the 3rd content to encrypt with a key created in the AWS Console"); You can retrieve the object using the same client. This example calls the :methodname:`getObjectAsString` method to retrieve the string that was stored. **Code** -.. literalinclude:: s3.java1.s3_encrypt.kms_encryption_only_retrieve.txt - :dedent: 8 - :language: java +.. code-block:: java -See the :sdk-examples-java-s3:`complete example ` on GitHub. + System.out.println(s3Encryption.getObjectAsString(bucket_name, ENCRYPTED_KEY3)); .. _authenticated-encryption-kms: -Authenticated Encryption Mode +Authenticated encryption mode ============================= When you use :classname:`AuthenticatedEncryption` mode, an improved key wrapping algorithm is @@ -102,56 +123,11 @@ To enable this mode, specify the :classname:`AuthenticatedEncryption` value in t **Code** -.. literalinclude:: s3.java1.s3_encrypt.kms_authenticated_encryption_builder.txt - :dedent: 8 - :language: java - -The :classname:`AuthenticatedEncryption` mode can retrieve unencrypted objects and -objects encrypted with :classname:`EncryptionOnly` mode. The following example shows the -|S3| encryption client retrieving an unencrypted object. - -**Code** - -.. literalinclude:: s3.java1.s3_encrypt.kms_authenticated_encryption_put_object.txt - :dedent: 8 - :language: java - -See the :sdk-examples-java-s3:`complete example ` on GitHub. - -.. _strict-authenticated-encryption-kms: - -Strict Authenticated Encryption -=============================== - -To enable this mode, specify the :classname:`StrictAuthenticatedEncryption` value in the -:methodName:`withCryptoConfiguration` method. - -.. note:: To use client-side authenticated encryption, you must include the latest - `Bouncy Castle jar `_ file - in the classpath of your application. - -**Code** - -.. literalinclude:: s3.java1.s3_encrypt.kms_authenticated_encryption_strict_builder.txt - :dedent: 8 - :language: java - -Call the :methodname:`putObject` method on the |S3| encryption client to upload objects. - -**Code** - -.. literalinclude:: s3.java1.s3_encrypt.kms_authenticated_encryption_strict_put_object.txt - :dedent: 8 - :language: java - -In :classname:`StrictAuthenticatedEncryption` mode, the |S3| client throws an -exception when retrieving an object that was not encrypted using an -authenticated mode. - -**Code** - -.. literalinclude:: s3.java1.s3_encrypt.kms_authenticated_encryption_strict_exception.txt - :dedent: 8 - :language: java +.. code-block:: java -See the :sdk-examples-java-s3:`complete example ` on GitHub. + AmazonS3EncryptionV2 s3Encryption = AmazonS3EncryptionClientV2Builder.standard() + .withRegion(Regions.US_WEST_2) + .withCryptoConfiguration(new CryptoConfigurationV2().withCryptoMode((CryptoMode.AuthenticatedEncryption))) + .withEncryptionMaterialsProvider(new KMSEncryptionMaterialsProvider(keyId)) + .build(); + \ No newline at end of file diff --git a/doc_source/examples-crypto-masterkey.rst b/doc_source/examples-crypto-masterkey.rst index 5ae4458..5afbd50 100644 --- a/doc_source/examples-crypto-masterkey.rst +++ b/doc_source/examples-crypto-masterkey.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the @@ -9,7 +9,7 @@ limitations under the License. ################################################### -|S3| Client-Side Encryption with Client Master Keys +|S3| client-side encryption with client master keys ################################################### .. meta:: @@ -17,7 +17,7 @@ :keywords: AWS SDK for Java code examples The following examples use the -:aws-java-class:`AmazonS3EncryptionClientBuilder ` class +:aws-java-class:`AmazonS3EncryptionClientV2Builder ` class to create an |S3| client with client-side encryption enabled. Once enabled, any objects you upload to |S3| using this client will be encrypted. Any objects you get from |S3| using this client will automatically @@ -28,69 +28,57 @@ be decrypted. encryption with customer-managed client master keys. To learn how to use encryption with |KMS| managed keys, see :doc:`examples-crypto-kms`. -You can choose from three encryption modes when enabling client-side |S3| encryption: encryption-only, -authenticated, and strict authenticated. +You can choose from two encryption modes when enabling client-side |S3| encryption: strict +authenticated or authenticated. The following sections show how to enable each type. To learn which algorithms each mode uses, see the :aws-java-class:`CryptoMode ` definition. -Required Imports +Required imports ================ Import the following classes for these examples. **Imports** -.. literalinclude:: s3.java1.s3_encrypt.import.txt - :language: java +.. code-block:: java -.. _encryption-only: + import com.amazonaws.ClientConfiguration; + import com.amazonaws.regions.Regions; + import com.amazonaws.services.s3.AmazonS3EncryptionClientV2Builder; + import com.amazonaws.services.s3.AmazonS3EncryptionV2; + import com.amazonaws.services.s3.model.CryptoConfigurationV2; + import com.amazonaws.services.s3.model.CryptoMode; + import com.amazonaws.services.s3.model.EncryptionMaterials; + import com.amazonaws.services.s3.model.StaticEncryptionMaterialsProvider; -Encryption-Only Mode -==================== - -Encryption-only is the default mode, if no :classname:`CryptoMode` is specified. To enable -encryption, you must pass a key to the :aws-java-class:`EncryptionMaterials` -constructor. The example below uses -the :class:`KeyGenerator` Java class generate a symmetric private key. - -**Code** - -.. literalinclude:: s3.java1.s3_encrypt.encryption_only.txt - :dedent: 4 - :language: java +.. _strict-authenticated-encryption: -To use an asymmetric key or a key pair, simply pass the key pair to the same -:aws-java-class:`EncryptionMaterials` class. The example below uses the -:class:`KeyPairGenerator` class to generate a key pair. +Strict authenticated encryption +=============================== -**Code** +Strict authenticated encryption is the default mode if no :classname:`CryptoMode` is specified. -.. literalinclude:: s3.java1.s3_encrypt.encryption_only_asymetric_key_build.txt - :dedent: 8 - :language: java +To explicitly enable this mode, specify the :classname:`StrictAuthenticatedEncryption` value in the +:methodName:`withCryptoConfiguration` method. -Call the :methodname:`putObject` method on the |S3| encryption client to upload objects. +.. note:: To use client-side authenticated encryption, you must include the latest + `Bouncy Castle jar `_ file + in the classpath of your application. **Code** -.. literalinclude:: s3.java1.s3_encrypt.encryption_only_asymetric_key_put_object.txt - :dedent: 8 - :language: java - -You can retrieve the object using the same client. This example calls the -:methodname:`getObjectAsString` method to retrieve the string that was stored. - -**Code** +.. code-block:: java -.. literalinclude:: s3.java1.s3_encrypt.encryption_only_asymetric_key_retrieve.txt - :dedent: 8 - :language: java + AmazonS3EncryptionV2 s3Encryption = AmazonS3EncryptionClientV2Builder.standard() + .withRegion(Regions.US_WEST_2) + .withCryptoConfiguration(new CryptoConfigurationV2().withCryptoMode((CryptoMode.StrictAuthenticatedEncryption))) + .withEncryptionMaterialsProvider(new StaticEncryptionMaterialsProvider(new EncryptionMaterials(secretKey))) + .build(); -See the :sdk-examples-java-s3:`complete example ` on GitHub. + s3Encryption.putObject(bucket_name, ENCRYPTED_KEY2, "This is the 2nd content to encrypt"); -.. _authenticated-encryption: -Authenticated Encryption Mode +Authenticated encryption mode ============================= When you use :classname:`AuthenticatedEncryption` mode, an improved key wrapping algorithm is @@ -109,48 +97,14 @@ To enable this mode, specify the :classname:`AuthenticatedEncryption` value in t **Code** -.. literalinclude:: s3.java1.s3_encrypt.authenticated_encryption_build.txt - :dedent: 8 - :language: java - -The :classname:`AuthenticatedEncryption` mode can retrieve unencrypted objects and -objects encrypted with :classname:`EncryptionOnly` mode. The following example shows the -|S3| encryption client retrieving an unencrypted object. - -**Code** - -.. literalinclude:: s3.java1.s3_encrypt.authenticated_encryption.txt - :dedent: 4 - :language: java - -See the :sdk-examples-java-s3:`complete example ` on GitHub. - -.. _strict-authenticated-encryption: - -Strict Authenticated Encryption -=============================== - -To enable this mode, specify the :classname:`StrictAuthenticatedEncryption` value in the -:methodName:`withCryptoConfiguration` method. - -.. note:: To use client-side authenticated encryption, you must include the latest - `Bouncy Castle jar `_ file - in the classpath of your application. - -**Code** - -.. literalinclude:: s3.java1.s3_encrypt.strict_authenticated_encryption_build.txt - :dedent: 8 - :language: java +.. code-block:: java -In :classname:`StrictAuthenticatedEncryption` mode, the |S3| client throws an -exception when retrieving an object that was not encrypted using an -authenticated mode. - -**Code** + AmazonS3EncryptionV2 s3EncryptionClientV2 = AmazonS3EncryptionClientV2Builder.standard() + .withRegion(Regions.DEFAULT_REGION) + .withClientConfiguration(new ClientConfiguration()) + .withCryptoConfiguration(new CryptoConfigurationV2().withCryptoMode(CryptoMode.AuthenticatedEncryption)) + .withEncryptionMaterialsProvider(new StaticEncryptionMaterialsProvider(new EncryptionMaterials(secretKey))) + .build(); -.. literalinclude:: s3.java1.s3_encrypt.strict_authenticated_encryption.txt - :dedent: 4 - :language: java + s3EncryptionClientV2.putObject(bucket_name, ENCRYPTED_KEY1, "This is the 1st content to encrypt"); -See the :sdk-examples-java-s3:`complete example ` on GitHub. diff --git a/doc_source/examples-crypto.rst b/doc_source/examples-crypto.rst index db71298..c37c681 100644 --- a/doc_source/examples-crypto.rst +++ b/doc_source/examples-crypto.rst @@ -1,4 +1,4 @@ -.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +.. Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the @@ -8,9 +8,9 @@ either express or implied. See the License for the specific language governing permissions and limitations under the License. -################################# -Using |S3| Client-Side Encryption -################################# +############################### +Use |S3| client-side encryption +############################### .. meta:: :description: How to use the cryptography configuration settings for the AWS SDK for Java @@ -20,12 +20,25 @@ Encrypting data using the |S3| encryption client is one way you can provide an additional layer of protection for sensitive information you store in |S3|. The examples in this section demonstrate how to create and configure the |S3| encryption client for your application. -If you are new to cryptography, -see the :KMS-dg:`Cryptography Basics ` in the |KMS-dg| for a basic overview of -cryptography terms and algorithms. + +If you are new to cryptography, see the :KMS-dg:`Cryptography Basics ` in the |KMS-dg| +for a basic overview of cryptography terms and algorithms. For information about cryptography +support across all AWS SDKs, see +:AWS-gr:`AWS SDK Support for Amazon S3 Client-Side Encryption ` in the +|AWS-gr|. .. include:: includes/examples-note.txt +If you are using version 1.11.836 or earlier of the AWS SDK for Java, see +:doc:`s3-encryption-migration` for information on migrating your applications to later versions. +If you cannot migrate, see +`this complete example `_ +on GitHub. + +Otherwise, if you are using version 1.11.837 or later of the AWS SDK for Java, explore the example +topics listed below to use |S3| client-side encryption. + + .. toctree:: :titlesonly: :maxdepth: 1 @@ -33,5 +46,4 @@ cryptography terms and algorithms. examples-crypto-masterkey examples-crypto-kms -For information about cryptography support across all AWS SDKs, see -:AWS-gr:`AWS SDK Support for Amazon S3 Client-Side Encryption ` in the |AWS-gr|. + diff --git a/doc_source/s3-encryption-migration.rst b/doc_source/s3-encryption-migration.rst new file mode 100644 index 0000000..f6c93c0 --- /dev/null +++ b/doc_source/s3-encryption-migration.rst @@ -0,0 +1,276 @@ +.. Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + + This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 + International License (the "License"). You may not use this file except in compliance with the + License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. + + This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + either express or implied. See the License for the specific language governing permissions and + limitations under the License. + +################################ +|S3| Encryption Client Migration +################################ + +.. meta:: + :description: How to migrate your applications from v1 to v2 of the AWS S3 client-side encryption + service client + :keywords: AWS for Java SDK, migrate, migration, CSE, encryption, key, KMS, S3, + AmazonS3EncryptionClientV2, AmazonS3EncryptionClient + + +This topic shows you how to migrate your applications from Version 1 (V1) of the |S3long| (|S3|) +encryption client to Version 2 (V2) and ensure application availability throughout the migration +process. + +.. _s3-cse-prereq: + +Prerequisites +============= + +* |S3| client-side encryption requires Java 8 or later to be installed in your application + environment. + The |sdk-java| works with the + `Oracle Java SE Development Kit `_ + and with distributions of Open Java Development Kit (OpenJDK) such as + `Amazon Corretto `_, + `Red Hat OpenJDK `_, + and `AdoptOpenJDK `_. + +* You need to take a dependency on BouncyCastle. If you don't already have this, + go to https://bouncycastle.org/latest_releases.html and download the provider file that corresponds to your JDK. + Alternatively, you can pick it up from Maven (groupId: org.bouncycastle, artifactId: bcprov-ext-jdk15on)." + +.. _s3-cse-overview: + +Migration Overview +================== + +This migration happens in two phases: + +1. **Update existing clients to read new formats.** Update your application to use version 1.11.837 + or later of the AWS SDK for Java and redeploy the application. This enables the |S3| client-side + encryption service clients in your application to decrypt objects created by V2 service clients. + If your application uses multiple AWS SDKs, you must update each SDK separately. + +2. **Migrate encryption and decryption clients to V2.** Once all of your V1 encryption clients can + read V2 encryption formats, update the |S3| client-side encryption and decryption clients in your + application code to use their V2 equivalents. + +.. _s3-cse-update-project: + +Update Existing Clients to Read New Formats +=========================================== + +The V2 encryption client uses encryption algorithms that older versions of the AWS SDK for Java do +not support. + +The first step in the migration is to update your V1 encryption clients to use version 1.11.837 or +later of the |sdk-java|. (We recommend that you update to the latest release version, which you can +find in the +`Java API Reference version 1.x `_.) To do +so, update the dependency in your project configuration. After your project configuration is +updated, rebuild your project and redeploy it. + +Once you have completed these steps, your application’s V1 encryption clients will be able to read +objects written by V2 encryption clients. + +Update the Dependency in Your Project Configuration +--------------------------------------------------- + +Modify your project configuration file (for example, pom.xml or build.gradle) to use version +1.11.837 or later of the AWS SDK for Java. Then, rebuild your project and redeploy it. + +Completing this step before deploying new application code helps to ensure that encryption +and decryption operations remain consistent across your fleet during the migration process. + +Example Using Maven +~~~~~~~~~~~~~~~~~~~ + +Snippet from a pom.xml file: + +.. code-block:: xml + + + + + com.amazonaws + aws-java-sdk-bom + 1.11.837 + pom + import + + + + +Example Using Gradle +~~~~~~~~~~~~~~~~~~~~ + +Snippet from a build.gradle file: + +.. code-block:: json + + dependencies { + implementation platform('com.amazonaws:aws-java-sdk-bom:1.11.837') + implementation 'com.amazonaws:aws-java-sdk-s3' + } + +.. _s3-cse-update-code: + +Migrate Encryption and Decryption Clients to V2 +=============================================== + +Once your project has been updated with the latest SDK version, you can modify your application code +to use the V2 client. To do so, first update your code to use the new service client builder. Then +provide encryption materials using a method on the builder that has been renamed, and configure your +service client further as needed. + +These code snippets demonstrate how to use client-side encryption with the AWS SDK for Java, and +provide comparisons between the V1 and V2 encryption clients. + +**V1** + +.. code-block:: java + + // minimal configuration in V1; default CryptoMode.EncryptionOnly. + EncryptionMaterialsProvider encryptionMaterialsProvider = ... + AmazonS3Encryption encryptionClient = AmazonS3EncryptionClient.encryptionBuilder() + .withEncryptionMaterials(encryptionMaterialsProvider) + .build(); + +**V2** + +.. code-block:: java + + // minimal configuration in V2; default CryptoMode.StrictAuthenticatedEncryption. + EncryptionMaterialsProvider encryptionMaterialsProvider = ... + AmazonS3EncryptionV2 encryptionClient = AmazonS3EncryptionClientV2.encryptionBuilder() + .withEncryptionMaterialsProvider(encryptionMaterialsProvider) + .withCryptoConfiguration(new CryptoConfigurationV2() + // The following setting allows the client to read V1 encrypted objects + .withCryptoMode(CryptoMode.AuthenticatedEncryption) + ) + .build(); + +The above example sets the :code:`cryptoMode` to :code:`AuthenticatedEncryption`. This is a setting +that allows a V2 encryption client to read objects that have been written by a V1 encryption +client. If your client does not need the capability to read objects written by a V1 client, then we +recommend using the default setting of :code:`StrictAuthenticatedEncryption` instead. + +Construct a V2 Encryption Client +-------------------------------- + +The V2 encryption client can be constructed by calling +*AmazonS3EncryptionClientV2.encryptionBuilder().* + +You can replace all of your existing V1 encryption clients with V2 encryption clients. A V2 +encryption client will always be able to read any object that has been written by a V1 encryption +client as long as you permit it to do so by configuring the V2 encryption client to use the +:code:`AuthenticatedEncryption` :code:`cryptoMode`. + +Creating a new V2 encryption client is very similar to how you create a V1 encryption client. +However, there are a few differences: + +* You will use a :code:`CryptoConfigurationV2` object to configure the client instead of a + :code:`CryptoConfiguration` object. This parameter is required. +* The default :code:`cryptoMode` setting for the V2 encryption client is + :code:`StrictAuthenticatedEncryption`. For the V1 encryption client it is :code:`EncryptionOnly`. +* The method *withEncryptionMaterials()* on the encryption client builder has been renamed to + *withEncryptionMaterialsProvider()*. This is merely a cosmetic change that more accurately + reflects the argument type. You must use the new method when you configure your service client. + +.. note:: When decrypting with AES-GCM, read the entire object to the end before you start using the + decrypted data. This is to verify that the object has not been modified since it was encrypted. + + +Use Encryption Materials Providers +---------------------------------- + +You can continue to use the same encryption materials providers and encryption materials objects +you are already using with the V1 encryption client. These classes are responsible for providing the +keys the encryption client uses to secure your data. They can be used interchangeably with both the +V2 and the V1 encryption client. + +Configure the V2 Encryption Client +---------------------------------- + +The V2 encryption client is configured with a :code:`CryptoConfigurationV2` object. This object can be +constructed by calling its default constructor and then modifying its properties as required from +the defaults. + +The default values for :code:`CryptoConfigurationV2` are: + +* :code:`cryptoMode` = :code:`CryptoMode.StrictAuthenticatedEncryption` +* :code:`storageMode` = :code:`CryptoStorageMode.ObjectMetadata` +* :code:`secureRandom` = instance of :code:`SecureRandom` +* :code:`rangeGetMode` = :code:`CryptoRangeGetMode.DISABLED` +* :code:`unsafeUndecryptableObjectPassthrough` = :code:`false` + +Note that `EncryptionOnly` is not a supported :code:`cryptoMode` in the V2 encryption client. The V2 +encryption client will always encrypt content using authenticated encryption, and protects content +encrypting keys (CEKs) using V2 :code:`KeyWrap` objects. + +The following example demonstrates how to specify the crypto configuration in V1, and how to +instantiate a *CryptoConfigurationV2* object to pass to the V2 encryption client builder. + +**V1** + +.. code-block:: java + + CryptoConfiguration cryptoConfiguration = new CryptoConfiguration() + .withCryptoMode(CryptoMode.StrictAuthenticatedEncryption); + +**V2** + +.. code-block:: java + + CryptoConfigurationV2 cryptoConfiguration = new CryptoConfigurationV2() + .withCryptoMode(CryptoMode.StrictAuthenticatedEncryption); + +.. _additional-examples: + +Additional Examples +=================== + +The following examples demonstrate how to address specific use cases related to a migration from V1 +to V2. + +Configure a Service Client to Read Objects Created by the V1 Encryption Client +------------------------------------------------------------------------------ + +To read objects that were previously written using a V1 encryption client, set the +:code:`cryptoMode` to :code:`AuthenticatedEncryption`. The following code snippet demonstrates how +to construct a configuration object with this setting. + +.. code-block:: java + + CryptoConfigurationV2 cryptoConfiguration = new CryptoConfigurationV2() + .withCryptoMode(CryptoMode.AuthenticatedEncryption); + +Configure a Service Client to Get Byte Ranges of Objects +-------------------------------------------------------- + +To be able to :code:`get` a range of bytes from an encrypted S3 object, enable the new configuration +setting :code:`rangeGetMode`. This setting is disabled on the V2 encryption client by default. Note +that even when enabled, a ranged :code:`get` only works on objects that have been encrypted using +algorithms supported by the :code:`cryptoMode` setting of the client. For more information, see +:aws-java-class:`CryptoRangeGetMode ` in the AWS SDK for Java +API Reference. + +If you plan to use the |S3| TransferManager to perform multipart downloads of encrypted |S3| objects +using the V2 encryption client, then you must first enable the :code:`rangeGetMode` setting on the +V2 encryption client. + +The following code snippet demonstrates how to configure the V2 client for performing a ranged +:code:`get`. + +.. code-block:: java + + // Allows range gets using AES/CTR, for V2 encrypted objects only + CryptoConfigurationV2 cryptoConfiguration = new CryptoConfigurationV2() + .withRangeGetMode(CryptoRangeGetMode.ALL); + + // Allows range gets using AES/CTR and AES/CBC, for V1 and V2 objects + CryptoConfigurationV2 cryptoConfiguration = new CryptoConfigurationV2() + .withCryptoMode(CryptoMode.AuthenticatedEncryption) + .withRangeGetMode(CryptoRangeGetMode.ALL); diff --git a/doc_source/security.rst b/doc_source/security.rst index 978ff0d..bdb10ca 100644 --- a/doc_source/security.rst +++ b/doc_source/security.rst @@ -24,9 +24,10 @@ Security for |SERVICENAMETITLE| :maxdepth: 1 :titlesonly: + Compliance Validation Data Protection Enforcing TLS 1.2 Identity and Access Management - Compliance Validation - Resilience Infrastructure Security + Resilience + S3 Encryption Client Migration From b91e8e9db8b90f085af22f2f242428b495a5fc73 Mon Sep 17 00:00:00 2001 From: Carey Burgess Date: Thu, 15 Oct 2020 12:51:07 -0700 Subject: [PATCH 139/139] minor edit --- doc_source/s3-encryption-migration.rst | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/doc_source/s3-encryption-migration.rst b/doc_source/s3-encryption-migration.rst index f6c93c0..0b09cac 100644 --- a/doc_source/s3-encryption-migration.rst +++ b/doc_source/s3-encryption-migration.rst @@ -28,18 +28,19 @@ process. Prerequisites ============= -* |S3| client-side encryption requires Java 8 or later to be installed in your application - environment. - The |sdk-java| works with the +|S3| client-side encryption requires the following: + +* Java 8 or later installed in your application environment. The |sdk-java| works with the `Oracle Java SE Development Kit `_ and with distributions of Open Java Development Kit (OpenJDK) such as `Amazon Corretto `_, `Red Hat OpenJDK `_, and `AdoptOpenJDK `_. -* You need to take a dependency on BouncyCastle. If you don't already have this, - go to https://bouncycastle.org/latest_releases.html and download the provider file that corresponds to your JDK. - Alternatively, you can pick it up from Maven (groupId: org.bouncycastle, artifactId: bcprov-ext-jdk15on)." +* The `Bouncy Castle Crypto package `_. You can + place the Bouncy Castle .jar file on the classpath of your application environment, or add a + dependency on the artifactId :code:`bcprov-ext-jdk15on` (with the groupId of + :code:`org.bouncycastle`) to your Maven :file:`pom.xml` file. .. _s3-cse-overview: