Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/aws-samples/legacy-cycle-store-mvc-app/llms.txt

Use this file to discover all available pages before exploring further.

This page walks through deploying the AWS infrastructure required by the Legacy Cycle Store application. All resources are defined in a single CloudFormation template — SqlServerRDSFixedUidPwd.yaml — so you can stand up the entire database environment with one stack creation, then tear it all down just as easily when you are finished.

What Gets Deployed

The CloudFormation stack creates the following resources in your AWS account:
ResourceTypeDetails
SQLDatabaseAWS::RDS::DBInstanceSQL Server Express 14.00.3281.6.v1, db.t2.micro, 20 GB, single-AZ, publicly accessible, 1-day backup retention
CycleStoreCredsAWS::SecretsManager::SecretStores username=DBUser and the master password for the RDS instance
RdsS3FullAccessRoleAWS::IAM::RoleTrusted by rds.amazonaws.com; grants S3 full access so RDS can read backup files
SQLServerSecurityGroupAWS::EC2::SecurityGroupOpens TCP port 1433 from 0.0.0.0/0 to allow SSMS and application connections
OptionGroupAWS::RDS::OptionGroupSQL Server Express 14.00 option group with the SQLSERVER_BACKUP_RESTORE option enabled
The SQLSERVER_BACKUP_RESTORE option group, combined with the S3-access IAM role, allows you to restore a .bak backup file stored in S3 directly into the RDS instance — useful for migrating an existing database without needing direct file access to the server.

Before You Deploy

The CloudFormation template contains a placeholder value <change-here> for the MasterUserPassword field. You must replace this value with a strong password before uploading the template. Deploying with the placeholder will cause the stack to fail during parameter validation.Locate and update the following section in SqlServerRDSFixedUidPwd.yaml:
SQLDatabase:
  Type: AWS::RDS::DBInstance
  Properties:
    MasterUsername: DBUser
    MasterUserPassword: <change-here>   # ← Replace this before deploying
Choose a password that meets SQL Server’s complexity requirements: at least eight characters, mixing uppercase letters, lowercase letters, digits, and symbols. After changing it, also update the CycleStoreCreds secret value in the same template so the stored secret stays in sync with the actual RDS password.

Deploy via AWS Console

1

Open the CloudFormation Console

Sign in to the AWS Management Console and navigate to CloudFormation in the Services menu. Make sure you are in the AWS Region where you want the RDS instance created (for example, us-east-1).
2

Create a New Stack

Click Create stack and choose With new resources (standard). Under Specify template, select Upload a template file, then click Choose file and select SqlServerRDSFixedUidPwd.yaml from your local copy of the project repository.
3

Specify Stack Details

On the Specify stack details page, enter a Stack name (for example, cycle-store-rds). Review the SqlServerInstanceName parameter — it defaults to SqlRdsDB and becomes part of the RDS instance identifier. The value must match the pattern [a-zA-Z][a-zA-Z0-9]*. Leave it as the default unless you need a different identifier.
4

Acknowledge IAM Capabilities

On the Configure stack options page you can leave defaults and click Next. On the final Review page, scroll to the bottom and check the box that reads I acknowledge that AWS CloudFormation might create IAM resources with custom names. This is required because the template creates the RdsS3FullAccessRole IAM role.
5

Wait for CREATE_COMPLETE

Click Create stack. The RDS instance provisioning typically takes 10–15 minutes. Monitor the Events tab in the CloudFormation console until the stack status changes to CREATE_COMPLETE. If the stack rolls back, check the Events tab for the first FAILED event to identify the cause.

Deploy via AWS CLI

If you prefer the command line, run the following command from the directory containing the template file. Replace <your-password> with the password you set in the template:
aws cloudformation deploy \
  --template-file SqlServerRDSFixedUidPwd.yaml \
  --stack-name cycle-store-rds \
  --parameter-overrides SqlServerInstanceName=SqlRdsDB \
  --capabilities CAPABILITY_NAMED_IAM \
  --region us-east-1
The --capabilities CAPABILITY_NAMED_IAM flag is required because the stack creates a named IAM role. Omitting it causes the deployment to fail with an InsufficientCapabilities error.

Stack Outputs

After the stack reaches CREATE_COMPLETE, the SQLDatabaseEndpoint output provides the hostname and port needed to connect to the database.
  1. Open the CloudFormation console and select your stack.
  2. Click the Outputs tab.
  3. Copy the value for SQLDatabaseEndpoint — it looks like sqlrdsdb.xxxxxxxxxx.us-east-1.rds.amazonaws.com:1433.

Credentials

The RDS master username is DBUser and the password is stored in the Secrets Manager secret named CycleStoreCredentials. You will use these credentials in both SSMS (to run the schema script) and in the application’s Web.config connection string. To retrieve the password from the AWS Console, navigate to Secrets Manager → CycleStoreCredentials → Retrieve secret value. From the CLI:
aws secretsmanager get-secret-value \
  --secret-id CycleStoreCredentials \
  --query SecretString \
  --output text \
  --region us-east-1

Build docs developers (and LLMs) love