AWS Security ChangesHomeSearch

AWS code-library documentation change

Service: code-library · 2026-01-10 · Documentation low

File: code-library/latest/ug/sfn_code_examples.md

Summary

Removed the 'Get started' section and all associated code examples for listing Step Functions state machines in .NET, Java, Kotlin, and Python programming languages.

Security assessment

The change removes introductory code examples demonstrating how to list state machines. There is no evidence of security vulnerabilities, security fixes, or security-related content in the removed material. The examples were basic API usage without security configurations or warnings.

Diff

diff --git a/code-library/latest/ug/sfn_code_examples.md b/code-library/latest/ug/sfn_code_examples.md
index 5d111680f..df91e2767 100644
--- a//code-library/latest/ug/sfn_code_examples.md
+++ b//code-library/latest/ug/sfn_code_examples.md
@@ -30,206 +29,0 @@ _Scenarios_ are code examples that show you how to accomplish specific tasks by
-**Get started**
-
-The following code examples show how to get started using Step Functions.
-
-.NET
-    
-
-**SDK for .NET**
-    
-
-###### Note
-
-There's more on GitHub. Find the complete example and learn how to set up and run in the [AWS Code Examples Repository](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/dotnetv3/StepFunctions#code-examples). 
-    
-    
-    namespace StepFunctionsActions;
-    
-    using Amazon.StepFunctions;
-    using Amazon.StepFunctions.Model;
-    
-    public class HelloStepFunctions
-    {
-        static async Task Main()
-        {
-            var stepFunctionsClient = new AmazonStepFunctionsClient();
-    
-            Console.Clear();
-            Console.WriteLine("Welcome to AWS Step Functions");
-            Console.WriteLine("Let's list up to 10 of your state machines:");
-            var stateMachineListRequest = new ListStateMachinesRequest { MaxResults = 10 };
-    
-            // Get information for up to 10 Step Functions state machines.
-            var response = await stepFunctionsClient.ListStateMachinesAsync(stateMachineListRequest);
-    
-            if (response.StateMachines.Count > 0)
-            {
-                response.StateMachines.ForEach(stateMachine =>
-                {
-                    Console.WriteLine($"State Machine Name: {stateMachine.Name}\tAmazon Resource Name (ARN): {stateMachine.StateMachineArn}");
-                });
-            }
-            else
-            {
-                Console.WriteLine("\tNo state machines were found.");
-            }
-        }
-    }
-    
-    
-    
-
-  * For API details, see [ListStateMachines](https://docs.aws.amazon.com/goto/DotNetSDKV3/states-2016-11-23/ListStateMachines) in _AWS SDK for .NET API Reference_. 
-
-
-
-
-Java
-    
-
-**SDK for Java 2.x**
-    
-
-###### Note
-
-There's more on GitHub. Find the complete example and learn how to set up and run in the [AWS Code Examples Repository](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/javav2/example_code/stepfunctions#code-examples). 
-
-Java version of Hello.
-    
-    
-    import software.amazon.awssdk.regions.Region;
-    import software.amazon.awssdk.services.sfn.SfnClient;
-    import software.amazon.awssdk.services.sfn.model.ListStateMachinesResponse;
-    import software.amazon.awssdk.services.sfn.model.SfnException;
-    import software.amazon.awssdk.services.sfn.model.StateMachineListItem;
-    import java.util.List;
-    
-    /**
-     * Before running this Java V2 code example, set up your development
-     * environment, including your credentials.
-     *
-     * For more information, see the following documentation topic:
-     *
-     * https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/get-started.html
-     */
-    public class ListStateMachines {
-        public static void main(String[] args) {
-            Region region = Region.US_EAST_1;
-            SfnClient sfnClient = SfnClient.builder()
-                    .region(region)
-                    .build();
-    
-            listMachines(sfnClient);
-            sfnClient.close();
-        }
-    
-        public static void listMachines(SfnClient sfnClient) {
-            try {
-                ListStateMachinesResponse response = sfnClient.listStateMachines();
-                List<StateMachineListItem> machines = response.stateMachines();
-                for (StateMachineListItem machine : machines) {
-                    System.out.println("The name of the state machine is: " + machine.name());
-                    System.out.println("The ARN value is : " + machine.stateMachineArn());
-                }
-    
-            } catch (SfnException e) {
-                System.err.println(e.awsErrorDetails().errorMessage());
-                System.exit(1);
-            }
-        }
-    }
-    
-    
-
-  * For API details, see [ListStateMachines](https://docs.aws.amazon.com/goto/SdkForJavaV2/states-2016-11-23/ListStateMachines) in _AWS SDK for Java 2.x API Reference_. 
-
-
-
-
-Kotlin
-    
-
-**SDK for Kotlin**
-    
-
-###### Note
-
-There's more on GitHub. Find the complete example and learn how to set up and run in the [AWS Code Examples Repository](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/kotlin/services/stepfunctions#code-examples). 
-    
-    
-    import aws.sdk.kotlin.services.sfn.SfnClient
-    import aws.sdk.kotlin.services.sfn.model.ListStateMachinesRequest
-    
-    /**
-     Before running this Kotlin code example, set up your development environment,
-     including your credentials.
-    
-     For more information, see the following documentation topic:
-     https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html
-     */
-    
-    suspend fun main() {
-        println(DASHES)
-        println("Welcome to the AWS Step Functions Hello example.")
-        println("Lets list up to ten of your state machines:")
-        println(DASHES)
-    
-        listMachines()
-    }
-    
-    suspend fun listMachines() {
-        SfnClient.fromEnvironment { region = "us-east-1" }.use { sfnClient ->
-            val response = sfnClient.listStateMachines(ListStateMachinesRequest {})
-            response.stateMachines?.forEach { machine ->
-                println("The name of the state machine is ${machine.name}")
-                println("The ARN value is ${machine.stateMachineArn}")
-            }
-        }
-    }
-    
-    
-
-  * For API details, see [ListStateMachines](https://sdk.amazonaws.com/kotlin/api/latest/index.html) in _AWS SDK for Kotlin API reference_. 
-
-
-
-
-Python
-    
-
-**SDK for Python (Boto3)**
-    
-
-###### Note
-
-There's more on GitHub. Find the complete example and learn how to set up and run in the [AWS Code Examples Repository](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/python/example_code/stepfunctions#code-examples). 
-    
-    
-    import boto3
-    
-    
-    def hello_stepfunctions(stepfunctions_client):
-        """
-        Use the AWS SDK for Python (Boto3) to create an AWS Step Functions client and list
-        the state machines in your account. This list might be empty if you haven't created
-        any state machines.
-        This example uses the default settings specified in your shared credentials
-        and config files.
-    
-        :param stepfunctions_client: A Boto3 Step Functions Client object.
-        """
-        print("Hello, Step Functions! Let's list up to 10 of your state machines:")
-        state_machines = stepfunctions_client.list_state_machines(maxResults=10)
-        for sm in state_machines["stateMachines"]:
-            print(f"\t{sm['name']}: {sm['stateMachineArn']}")
-