I tried script generation using the newly added open source project "AWS Developer Tutorials"

I tried script generation using the newly added open source project "AWS Developer Tutorials"

2025.09.08

I'm Iwasa.

The following update? was recently announced on AWS What's New.

https://aws.amazon.com/about-aws/whats-new/2025/09/open-source-aws-cli-scripts/

I think many of you were curious about what this is, but at the same time, many may not have looked into it closely as the announcement alone wasn't very clear.

This announcement is about a collection of scripts from the "AWS Developer Tutorials" project provided by AWS, which allows users to generate scripts aligned with use cases and scenarios rather than just executing one-off commands.

I tried using it a bit, so let me introduce it.

First, clone the repository

This is not an AWS service or tool like CLI, but a repository containing sample use cases and context files for agents.
You use it by cloning it locally.

https://github.com/aws-samples/sample-developer-tutorials/tree/main

So let's just clone it.

			
			% git clone https://github.com/aws-samples/sample-developer-tutorials.git
Cloning into 'sample-developer-tutorials'...
remote: Enumerating objects: 767, done.
remote: Counting objects: 100% (176/176), done.
remote: Compressing objects: 100% (94/94), done.
remote: Total 767 (delta 89), reused 102 (delta 71), pack-reused 591 (from 2)
Receiving objects: 100% (767/767), 735.51 KiB | 5.57 MiB/s, done.
Resolving deltas: 100% (239/239), done.
```## Using Scripts

The template can ultimately be used by users as a template for creating scripts using generative AI, but the `tuts` folder already contains several pre-generated sample images.  
Let's take a look at these first.

![image.png](https://devio2024-2-media.developers.io/upload/6zWUnlDies1gnRi1IhiTa6/2025-09-07/dBz9aUI2K96H.png)

There are 86 different sample use cases prepared.

![image.png](https://devio2024-2-media.developers.io/upload/6zWUnlDies1gnRi1IhiTa6/2025-09-07/YXGjVE1X36N7.png)

Let's look at `001-lightsail-gs` from these. In the repository, as shown below, tutorials and scripts are provided.  
The idea is that by executing the script, all the content of the tutorial will be executed.

https://github.com/aws-samples/sample-developer-tutorials/tree/main/tuts/001-lightsail-gs

Let's run `lightsail-gs.sh`.

```bash
001-lightsail-gs % ./lightsail-gs.sh                                   
Using AWS region: us-west-2
Starting Lightsail Getting Started script at Mon Sep  8 06:15:26 JST 2025
Step 1: Verifying AWS CLI configuration
      Name                    Value             Type    Location
      ----                    -----             ----    --------
   profile                <not set>             None    None
access_key     ****************BRHP shared-credentials-file    
secret_key     ****************Z+wx shared-credentials-file    
    region                us-west-2              env    ['AWS_REGION', 'AWS_DEFAULT_REGION']
Step 2: Getting available blueprints and bundles
Available blueprints (showing first 5):
---------------------------------------------------------------------
|                           GetBlueprints                           |
+---------------------------------------+---------------------------+
|  windows_server_2022                  |  Windows Server 2022      |
|  windows_server_2019                  |  Windows Server 2019      |
|  windows_server_2016                  |  Windows Server 2016      |
|  windows_server_2022_sql_2022_express |  SQL Server 2022 Express  |
|  windows_server_2022_sql_2019_express |  SQL Server 2019 Express  |
+---------------------------------------+---------------------------+
Available bundles (showing first 5):
----------------------------------
|           GetBundles           |
+-------------+----------+-------+
|  nano_3_0   |  Nano    |  5.0  |
|  micro_3_0  |  Micro   |  7.0  |
|  small_3_0  |  Small   |  12.0 |
|  medium_3_0 |  Medium  |  24.0 |
|  large_3_0  |  Large   |  44.0 |
+-------------+----------+-------+
Getting available regions and availability zones
Using availability zone: us-west-2a
Step 3: Creating Lightsail instance: LightsailInstance-45fbcba6
{
    "operations": [
        {
            "id": "1e3333b6-3485-4c0c-87ac-56ac5df95a97",
            "resourceName": "LightsailInstance-45fbcba6",
            "resourceType": "Instance",
            "createdAt": "2025-09-08T06:15:41.228000+09:00",
            "location": {
                "availabilityZone": "us-west-2a",
                "regionName": "us-west-2"
            },
            "isTerminal": false,
            "operationType": "CreateInstance",
            "status": "Started",
            "statusChangedAt": "2025-09-08T06:15:41.228000+09:00"
        }
    ]
}
Created instance: LightsailInstance-45fbcba6
Waiting for instance to be in running state...

:
```I can see that not only is it creating instances, but it's also retrieving key pairs, adding storage, and creating snapshots.  
Looking at the script, perhaps because it's a sample, the region is fixed (us-east-2).

![image.png](https://devio2024-2-media.developers.io/upload/6zWUnlDies1gnRi1IhiTa6/2025-09-07/b7s1tglVY7L8.png)

I just ran the script, and a new Lightsail instance was generated, with storage addition and snapshot creation also initiated. I see.

![image.png](https://devio2024-2-media.developers.io/upload/6zWUnlDies1gnRi1IhiTa6/2025-09-07/8quM4tGXsO88.png)## Creating Scripts

The script we discussed earlier was merely a tutorial or sample script.  
The purpose of this repository is to demonstrate that **"you can easily create such scripts using generative AI (Amazon Q Developer CLI). Pre-provided assets are available for this purpose."**

So let's create one.  
This time we'll check the `instra` folder.

![image.png](https://devio2024-2-media.developers.io/upload/6zWUnlDies1gnRi1IhiTa6/2025-09-07/2yPFtuSqbdDU.png)

The README.md in this folder contains instructions for creating scripts.  
However, as the information is somewhat limited, I recommend trying it out yourself.  
As mentioned above, you need the following tools available beforehand:

- AWS CLI
- Q CLI
- AWS Docs MCP server
- AWS CLI GitHub repository

You might wonder what the AWS Document MCP Server is used for - when creating scripts, it can reference existing official documentation and build scripts according to the steps described on those pages. Alternatively, you can use existing scripts (sample use cases) as templates.

Let's follow the README.md and create a script using the AWS Payment Cryptography Getting Started page as a reference.

https://docs.aws.amazon.com/payment-cryptography/latest/userguide/getting-started.html

The folder name might seem a bit odd, but don't worry about it.  
Let's start the Amazon Q Developer CLI. The key point is to instruct the agent to generate content according to the `instra/tutorial-gen` folder.  
This folder contains detailed instructions on how to create scripts and what content to include for Amazon Q Developer.

```bash
099-lightsail-tokyo-gs % q chat
✓ awslabs.aws-documentation-mcp-server loaded in 3.41 s
✓ playwright loaded in 3.99 s


    ⢠⣶⣶⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣤⣶⣿⣿⣿⣶⣦⡀⠀
 ⠀⠀⠀⣾⡿⢻⣿⡆⠀⠀⠀⢀⣄⡄⢀⣠⣤⣤⡀⢀⣠⣤⣤⡀⠀⠀⢀⣠⣤⣤⣤⣄⠀⠀⢀⣤⣤⣤⣤⣤⣤⡀⠀⠀⣀⣤⣤⣤⣀⠀⠀⠀⢠⣤⡀⣀⣤⣤⣄⡀⠀⠀⠀⠀⠀⠀⢠⣿⣿⠋⠀⠀⠀⠙⣿⣿⡆
 ⠀⠀⣼⣿⠇⠀⣿⣿⡄⠀⠀⢸⣿⣿⠛⠉⠻⣿⣿⠛⠉⠛⣿⣿⠀⠀⠘⠛⠉⠉⠻⣿⣧⠀⠈⠛⠛⠛⣻⣿⡿⠀⢀⣾⣿⠛⠉⠻⣿⣷⡀⠀⢸⣿⡟⠛⠉⢻⣿⣷⠀⠀⠀⠀⠀⠀⣼⣿⡏⠀⠀⠀⠀⠀⢸⣿⣿
 ⠀⢰⣿⣿⣤⣤⣼⣿⣷⠀⠀⢸⣿⣿⠀⠀⠀⣿⣿⠀⠀⠀⣿⣿⠀⠀⢀⣴⣶⣶⣶⣿⣿⠀⠀⠀⣠⣾⡿⠋⠀⠀⢸⣿⣿⠀⠀⠀⣿⣿⡇⠀⢸⣿⡇⠀⠀⢸⣿⣿⠀⠀⠀⠀⠀⠀⢹⣿⣇⠀⠀⠀⠀⠀⢸⣿⡿
 ⢀⣿⣿⠋⠉⠉⠉⢻⣿⣇⠀⢸⣿⣿⠀⠀⠀⣿⣿⠀⠀⠀⣿⣿⠀⠀⣿⣿⡀⠀⣠⣿⣿⠀⢀⣴⣿⣋⣀⣀⣀⡀⠘⣿⣿⣄⣀⣠⣿⣿⠃⠀⢸⣿⡇⠀⠀⢸⣿⣿⠀⠀⠀⠀⠀⠀⠈⢿⣿⣦⣀⣀⣀⣴⣿⡿⠃
 ⠚⠛⠋⠀⠀⠀⠀⠘⠛⠛⠀⠘⠛⠛⠀⠀⠀⠛⠛⠀⠀⠀⠛⠛⠀⠀⠙⠻⠿⠟⠋⠛⠛⠀⠘⠛⠛⠛⠛⠛⠛⠃⠀⠈⠛⠿⠿⠿⠛⠁⠀⠀⠘⠛⠃⠀⠀⠘⠛⠛⠀⠀⠀⠀⠀⠀⠀⠀⠙⠛⠿⢿⣿⣿⣋⠀⠀
 ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠛⠿⢿⡧

╭─────────────────────────────── Did you know? ────────────────────────────────╮
│                                                                              │
│    If you want to file an issue to the Q CLI team, just tell me, or run q    │
│                                    issue                                     │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

/help all commands  •  ctrl + j new lines  •  ctrl + s fuzzy search
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🤖 You are chatting with claude-sonnet-4

> read the instructions in the ../../instra/tutorial-gen folder and follow them in order, using this topic: https://docs.aws.amazon.com/payment-cryptography/latest/userguide/getting-started.html when instructed to run the script in step 2b, it's ok to actually run the script and create resources. this is part of the process. when you generate the script, be careful to check required options and option names for each command."

> I'll read the instructions in the tutorial-gen folder and follow them to create a tutorial based on the AWS Payment Cryptography getting started guide.
```The folder structure looks like this, but essentially it explains that you should follow these steps:

![image.png](https://devio2024-2-media.developers.io/upload/6zWUnlDies1gnRi1IhiTa6/2025-09-07/cWDD2ZgjCmxR.png)

- Use AWS Document MCP Server to retrieve tutorials and save them in Markdown
- Use commands like `aws help` to get AWS CLI information
- Create scripts
- Run scripts. If errors occur, update the script and run again
- Once the script works, perform static analysis
- Create tutorial documentation

After waiting for a while, Amazon Q Developer creates various deliverables in the current directory as shown below.

![09F6F008-BB8F-4DBD-ACC6-BDBC4396603A_4_5005_c.jpeg](https://devio2024-2-media.developers.io/upload/6zWUnlDies1gnRi1IhiTa6/2025-09-07/iJeU3d3XQmw2.jpeg)

Scripts and tutorials were created as follows:

![E927CB2D-877B-410B-B429-E359458F73CE.png](https://devio2024-2-media.developers.io/upload/6zWUnlDies1gnRi1IhiTa6/2025-09-07/8xbUstDNxuOo.png)

![3CBC908B-02F0-41FF-9D48-80D421CBD6BF.png](https://devio2024-2-media.developers.io/upload/6zWUnlDies1gnRi1IhiTa6/2025-09-07/6OdwGHohpeVt.png) 

As mentioned earlier, the script execution has also been performed, so when looking at the management console, you can confirm that resources have been created.

![image.png](https://devio2024-2-media.developers.io/upload/6zWUnlDies1gnRi1IhiTa6/2025-09-07/aZkMVl4LOgxb.png)

## In Conclusion

Today, I tried script generation using the newly added open source project "AWS Developer Tutorials".

Since I personally don't often have opportunities to prepare environment setup scripts with AWS CLI, I wonder about its use cases, but for those who prepare with AWS CLI, it seems good to create the initial script with this tool and then modify it.  
You can generate scripts using AWS CLI that include processes that are typically omitted, such as error handling and cleanup.
		

Share this article

FacebookHatena blogX

Related articles