diff --git a/LICENSE.txt b/LICENSE.txt
index d645695673..6ff2c6fd00 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -200,3 +200,21 @@
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.
+
+ ======================================================================================
+ Amazon SageMaker Examples Subcomponents:
+
+ The Amazon SageMaker Examples project contains subcomponents with separate
+ copyright notices and license terms. Your use of the source code for the
+ these subcomponents is subject to the terms and conditions of the following
+ licenses. See licenses/ for text of these licenses.
+
+ If a folder hierarchy is listed as subcomponent, separate listings of
+ further subcomponents (files or folder hierarchies) part of the hierarchy
+ take precedence.
+
+ =======================================================================================
+ 2-clause BSD license
+ =======================================================================================
+ _static/kendrasearchtools.js
+ _templates/search.html
diff --git a/_static/kendrasearchtools.js b/_static/kendrasearchtools.js
new file mode 100644
index 0000000000..f2d47ef889
--- /dev/null
+++ b/_static/kendrasearchtools.js
@@ -0,0 +1,692 @@
+/*
+ * kendrasearchtools.js
+ * ~~~~~~~~~~~~~~~~
+ *
+ * A modification of searchtools.js (https://github.com/sphinx-doc/sphinx/blob/275d9/sphinx/themes/basic/static/searchtools.js)
+ * where the default full-text search implemented in searchtools.js is replaced with AWS Kendra searching over multiple
+ * websites. The default full-text search is still kept and implemented as a fallback in the case that the Kendra search doesn't work.
+ *
+ * :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+if (!Scorer) {
+ /**
+ * Simple result scoring code.
+ */
+ var Scorer = {
+ // Implement the following function to further tweak the score for each result
+ // The function takes a result array [filename, title, anchor, descr, score]
+ // and returns the new score.
+ /*
+ score: function(result) {
+ return result[4];
+ },
+ */
+
+ // query matches the full name of an object
+ objNameMatch: 11,
+ // or matches in the last dotted part of the object name
+ objPartialMatch: 6,
+ // Additive scores depending on the priority of the object
+ objPrio: {0: 15, // used to be importantResults
+ 1: 5, // used to be objectResults
+ 2: -5}, // used to be unimportantResults
+ // Used when the priority is not in the mapping.
+ objPrioDefault: 0,
+
+ // query found in title
+ title: 15,
+ partialTitle: 7,
+ // query found in terms
+ term: 5,
+ partialTerm: 2
+ };
+}
+
+if (!splitQuery) {
+ function splitQuery(query) {
+ return query.split(/\s+/);
+ }
+}
+
+/**
+ * default rtd search (used as fallback)
+ */
+var Search = {
+
+ _index : null,
+ _queued_query : null,
+ _pulse_status : -1,
+
+ htmlToText : function(htmlString) {
+ var virtualDocument = document.implementation.createHTMLDocument('virtual');
+ var htmlElement = $(htmlString, virtualDocument);
+ htmlElement.find('.headerlink').remove();
+ docContent = htmlElement.find('[role=main]')[0];
+ if(docContent === undefined) {
+ console.warn("Content block not found. Sphinx search tries to obtain it " +
+ "via '[role=main]'. Could you check your theme or template.");
+ return "";
+ }
+ return docContent.textContent || docContent.innerText;
+ },
+
+ init : function() {
+ var params = $.getQueryParameters();
+ if (params.q) {
+ var query = params.q[0];
+ $('input[name="q"]')[0].value = query;
+ // this.performSearch(query);
+ }
+ },
+
+ loadIndex : function(url) {
+ $.ajax({type: "GET", url: url, data: null,
+ dataType: "script", cache: true,
+ complete: function(jqxhr, textstatus) {
+ if (textstatus != "success") {
+ document.getElementById("searchindexloader").src = url;
+ }
+ }});
+ },
+
+ setIndex : function(index) {
+ var q;
+ this._index = index;
+ if ((q = this._queued_query) !== null) {
+ this._queued_query = null;
+ Search.query(q);
+ }
+ },
+
+ hasIndex : function() {
+ return this._index !== null;
+ },
+
+ deferQuery : function(query) {
+ this._queued_query = query;
+ },
+
+ stopPulse : function() {
+ this._pulse_status = 0;
+ },
+
+ startPulse : function() {
+ if (this._pulse_status >= 0)
+ return;
+ function pulse() {
+ var i;
+ Search._pulse_status = (Search._pulse_status + 1) % 4;
+ var dotString = '';
+ for (i = 0; i < Search._pulse_status; i++)
+ dotString += '.';
+ Search.dots.text(dotString);
+ if (Search._pulse_status > -1)
+ window.setTimeout(pulse, 500);
+ }
+ pulse();
+ },
+
+ /**
+ * perform a search for something (or wait until index is loaded)
+ */
+ performSearch : function(query) {
+ // create the required interface elements
+ this.out = $('#search-results');
+ this.title = $('#search-results h2:first'); // $('
').appendTo(this.out);
+ this.out.css("margin", "auto");
+
+ $('#search-progress').text(_('Preparing search...'));
+ this.startPulse();
+
+ this.query(query, 1)
+ },
+
+};
+
+$(document).ready(function() {
+ KendraSearch.init();
+});
diff --git a/_static/pagination.css b/_static/pagination.css
new file mode 100644
index 0000000000..7584510574
--- /dev/null
+++ b/_static/pagination.css
@@ -0,0 +1,17 @@
+.pagination {
+ display: inline-block;
+}
+
+.pagination a {
+ color: black;
+ float: left;
+ padding: 8px 16px;
+ text-decoration: none;
+}
+
+.pagination a.active {
+ background-color: #2a80b9;
+ color: white;
+}
+
+.pagination a:hover:not(.active) {background-color: #ddd;}
\ No newline at end of file
diff --git a/_static/search_accessories.css b/_static/search_accessories.css
new file mode 100644
index 0000000000..c7e09e1f06
--- /dev/null
+++ b/_static/search_accessories.css
@@ -0,0 +1,29 @@
+.example-badge {
+ background-color: #c63340;
+ color: white;
+ padding: 0.25rem 0.5rem;
+ text-align: center;
+ border-radius: 5px;
+ font-size: 0.8rem;
+ display: inline-block;
+}
+
+.aws-doc-badge {
+ background-color: #e18b50;
+ color: white;
+ padding: 0.25rem 0.5rem;
+ text-align: center;
+ border-radius: 5px;
+ font-size: 0.8rem;
+ display: inline-block;
+}
+
+.sdk-doc-badge {
+ background-color: #4c968f;
+ color: white;
+ padding: 0.25rem 0.5rem;
+ text-align: center;
+ border-radius: 5px;
+ font-size: 0.8rem;
+ display: inline-block;
+}
\ No newline at end of file
diff --git a/_templates/search.html b/_templates/search.html
new file mode 100644
index 0000000000..93c01c7799
--- /dev/null
+++ b/_templates/search.html
@@ -0,0 +1,56 @@
+{#
+ basic/search.html
+ ~~~~~~~~~~~~~~~~~
+
+ Template for the search page.
+
+ :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS.
+ :license: BSD, see https://github.com/sphinx-doc/sphinx/blob/master/LICENSE for details.
+#}
+{%- extends "layout.html" %}
+{% set title = _('Search') %}
+{% set display_vcs_links = False %}
+{%- block scripts %}
+ {{ super() }}
+
+
+{%- endblock %}
+{% block footer %}
+{# this is used when loading the search index using $.ajax fails,
+ such as on Chrome for documents on localhost #}
+
+
+{{ super() }}
+{% endblock %}
+{% block body %}
+
+
+{% if search_performed %}
+ {# Translators: Search is a noun, not a verb #}
+
{{ _('Search Results') }}
+ {% if not search_results %}
+
{{ _('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve used the correct terminology.') }}
+ {% endif %}
+{% endif %}
+
+{% if search_results %}
+
+ {% for href, caption, context in search_results %}
+
+{% endblock %}
diff --git a/conf.py b/conf.py
index bdef605979..05259a9c13 100644
--- a/conf.py
+++ b/conf.py
@@ -63,3 +63,8 @@
html_js_files = [
"https://a0.awsstatic.com/s_code/js/3.0/awshome_s_code.js",
]
+
+html_css_files = [
+ 'pagination.css',
+ 'search_accessories.css',
+]
diff --git a/licenses/2-CLAUSE-BSD b/licenses/2-CLAUSE-BSD
new file mode 100644
index 0000000000..b79ea4a15c
--- /dev/null
+++ b/licenses/2-CLAUSE-BSD
@@ -0,0 +1,28 @@
+2-Clause BSD License
+=====================
+
+Copyright (c) 2007-2020 by the Sphinx team (see AUTHORS file).
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+* Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file