AWS Security ChangesHomeSearch

AWS iot-sitewise documentation change

Service: iot-sitewise · 2025-11-25 · Documentation low

File: iot-sitewise/latest/userguide/example_iotsitewise_Scenario_section.md

Summary

Removed steps related to creating, describing, and deleting IoT SiteWise portals from the example scenario. Renumbered subsequent steps and deleted associated code examples and SDK wrapper methods for portal operations.

Security assessment

The changes remove documentation about portal management but do not indicate a security vulnerability fix. While portals involve IAM roles and access control, the removal appears to simplify the example scenario rather than address a specific security issue. No security advisories, vulnerability references, or hardening guidance were added/modified.

Diff

diff --git a/iot-sitewise/latest/userguide/example_iotsitewise_Scenario_section.md b/iot-sitewise/latest/userguide/example_iotsitewise_Scenario_section.md
index d4271d7bb..efca6abfa 100644
--- a//iot-sitewise/latest/userguide/example_iotsitewise_Scenario_section.md
+++ b//iot-sitewise/latest/userguide/example_iotsitewise_Scenario_section.md
@@ -247,47 +247 @@ Run an interactive scenario demonstrating AWS IoT SiteWise features.
-            logger.info("6. Create an IoT SiteWise Portal");
-            logger.info("""
-                 An IoT SiteWise Portal allows you to aggregate data from multiple industrial sources, 
-                 such as sensors, equipment, and control systems, into a centralized platform.
-                """);
-            waitForInputToContinue(scanner);
-            String portalId;
-            try {
-                portalId = sitewiseActions.createPortalAsync(portalName, iamRole, contactEmail).join();
-                logger.info("Portal created successfully. Portal ID {}", portalId);
-            } catch (CompletionException ce) {
-                Throwable cause = ce.getCause();
-                if (cause instanceof IoTSiteWiseException siteWiseEx) {
-                    logger.error("IoT SiteWise error occurred: Error message: {}, Error code {}",
-                            siteWiseEx.getMessage(), siteWiseEx.awsErrorDetails().errorCode(), siteWiseEx);
-                } else {
-                    logger.error("An unexpected error occurred: {}", cause.getMessage());
-                }
-                return;
-            }
-            waitForInputToContinue(scanner);
-            logger.info(DASHES);
-    
-            logger.info(DASHES);
-            logger.info("7. Describe the Portal");
-            logger.info("""
-                 In this step, we get a description of the portal and display the portal URL.
-                """);
-            waitForInputToContinue(scanner);
-            try {
-                String portalUrl = sitewiseActions.describePortalAsync(portalId).join();
-                logger.info("Portal URL: {}", portalUrl);
-            } catch (CompletionException ce) {
-                Throwable cause = ce.getCause();
-                if (cause instanceof ResourceNotFoundException notFoundException) {
-                    logger.error("A ResourceNotFoundException occurred: Error message: {}, Error code {}",
-                            notFoundException.getMessage(), notFoundException.awsErrorDetails().errorCode(), notFoundException);
-                } else {
-                    logger.error("An unexpected error occurred: {}", cause.getMessage());
-                }
-                return;
-            }
-            waitForInputToContinue(scanner);
-            logger.info(DASHES);
-    
-            logger.info(DASHES);
-            logger.info("8. Create an IoT SiteWise Gateway");
+            logger.info("6. Create an IoT SiteWise Gateway");
@@ -320 +274 @@ Run an interactive scenario demonstrating AWS IoT SiteWise features.
-            logger.info("9. Describe the IoT SiteWise Gateway");
+            logger.info("7. Describe the IoT SiteWise Gateway");
@@ -343 +297 @@ Run an interactive scenario demonstrating AWS IoT SiteWise features.
-            logger.info("10. Delete the AWS IoT SiteWise Assets");
+            logger.info("8. Delete the AWS IoT SiteWise Assets");
@@ -353,14 +306,0 @@ Run an interactive scenario demonstrating AWS IoT SiteWise features.
-                waitForInputToContinue(scanner);
-                try {
-                    sitewiseActions.deletePortalAsync(portalId).join();
-                    logger.info("Portal {} was deleted successfully.", portalId);
-    
-                } catch (CompletionException ce) {
-                    Throwable cause = ce.getCause();
-                    if (cause instanceof ResourceNotFoundException notFoundException) {
-                        logger.error("A ResourceNotFoundException occurred: Error message: {}, Error code {}",
-                                notFoundException.getMessage(), notFoundException.awsErrorDetails().errorCode(), notFoundException);
-                    } else {
-                        logger.error("An unexpected error occurred: {}", cause.getMessage());
-                    }
-                }
@@ -729,57 +668,0 @@ A wrapper class for AWS IoT SiteWise SDK methods.
-        /**
-         * Creates a new IoT SiteWise portal.
-         *
-         * @param portalName   the name of the portal to create.
-         * @param iamRole      the IAM role ARN to use for the portal.
-         * @param contactEmail the email address of the portal contact.
-         * @return a {@link CompletableFuture} that represents a {@link String} result of the portal ID. The calling code
-         *         can attach callbacks, then handle the result or exception by calling {@link CompletableFuture#join()} or
-         *         {@link CompletableFuture#get()}.
-         *         <p>
-         *         If any completion stage in this method throws an exception, the method logs the exception cause and keeps
-         *         it available to the calling code as a {@link CompletionException}. By calling
-         *         {@link CompletionException#getCause()}, the calling code can access the original exception.
-         */
-        public CompletableFuture<String> createPortalAsync(String portalName, String iamRole, String contactEmail) {
-            CreatePortalRequest createPortalRequest = CreatePortalRequest.builder()
-                .portalName(portalName)
-                .portalDescription("This is my custom IoT SiteWise portal.")
-                .portalContactEmail(contactEmail)
-                .roleArn(iamRole)
-                .build();
-    
-            return getAsyncClient().createPortal(createPortalRequest)
-                .handle((response, exception) -> {
-                    if (exception != null) {
-                        logger.error("Failed to create portal: {} ", exception.getCause().getMessage());
-                        throw (CompletionException) exception;
-                    }
-                    return response.portalId();
-                });
-        }
-    
-        /**
-         * Deletes a portal.
-         *
-         * @param portalId the ID of the portal to be deleted.
-         * @return a {@link CompletableFuture} that represents a {@link DeletePortalResponse}. The calling code can attach
-         *         callbacks, then handle the result or exception by calling {@link CompletableFuture#join()} or
-         *         {@link CompletableFuture#get()}.
-         *         <p>
-         *         If any completion stage in this method throws an exception, the method logs the exception cause and keeps
-         *         it available to the calling code as a {@link CompletionException}. By calling
-         *         {@link CompletionException#getCause()}, the calling code can access the original exception.
-         */
-        public CompletableFuture<DeletePortalResponse> deletePortalAsync(String portalId) {
-            DeletePortalRequest deletePortalRequest = DeletePortalRequest.builder()
-                .portalId(portalId)
-                .build();
-    
-            return getAsyncClient().deletePortal(deletePortalRequest)
-                .whenComplete((response, exception) -> {
-                    if (exception != null) {
-                        logger.error("Failed to delete portal with ID: {}. Error: {}", portalId, exception.getCause().getMessage());
-                    }
-                });
-        }
-    
@@ -815,27 +697,0 @@ A wrapper class for AWS IoT SiteWise SDK methods.
-        /**
-         * Retrieves a portal's description.
-         *
-         * @param portalId the ID of the portal to describe.
-         * @return a {@link CompletableFuture} that represents a {@link String} result of the portal's start URL
-         *         (see: {@link DescribePortalResponse#portalStartUrl()}). The calling code can attach callbacks, then handle the
-         *         result or exception by calling {@link CompletableFuture#join()} or {@link CompletableFuture#get()}.
-         *         <p>
-         *         If any completion stage in this method throws an exception, the method logs the exception cause and keeps
-         *         it available to the calling code as a {@link CompletionException}. By calling
-         *         {@link CompletionException#getCause()}, the calling code can access the original exception.
-         */
-        public CompletableFuture<String> describePortalAsync(String portalId) {
-            DescribePortalRequest request = DescribePortalRequest.builder()
-                .portalId(portalId)
-                .build();
-    
-            return getAsyncClient().describePortal(request)
-                .handle((response, exception) -> {
-                    if (exception != null) {
-                       logger.error("An exception occurred retrieving the portal description: {}", exception.getCause().getMessage());
-                       throw (CompletionException) exception;
-                    }
-                    return response.portalStartUrl();
-                });
-        }
-