Turn Your PartyRock App
Into a Real Website

A step-by-step guide for non-technical users. No coding required. Your app live on the internet in about 1.5 hours.

Choose Your Path

๐ŸŒ
Personal AWS Account
Create your own AWS account. Full control, near-zero cost on free tier.
Start Steps 1โ€“8 โ†’
๐Ÿงช
AWS Lab / Sandbox Environment
Using AWS Skill Builder, Vocareum, AWS Academy, or an event sandbox? Start here โ€” no account creation needed.
Sandbox Guide โ†’

What You Will Build

๐ŸŒ

Real Website

S3 + CloudFront with HTTPS, accessible to anyone

๐Ÿค–

AI Backend

Lambda + Bedrock with input protection and retry logic

๐Ÿ”’

Secured

API key auth, scoped IAM, WAF rate limiting

๐Ÿ“Š

Monitored

CloudWatch alarms, billing alerts, logs

๐Ÿš€

Auto Deploy

GitHub Actions โ€” push code, it deploys itself

โœจ

App Planner

Fill in your app details โ†’ get Kiro chat prompt + spec plan instantly

How It All Fits Together

This section explains the real architecture you're building โ€” every service, what role it plays, and exactly what happens on each request and each deployment. Nothing here is simplified away; it matches precisely what Steps 1โ€“10 have you do.

Services & Frameworks Used

Service / ToolRoleIntroduced inRequired?
Amazon S3Object storage. Hosts your static frontend (index.html) as a public website endpoint.Step 2 (bucket), Step 5 (files)Required
AWS LambdaServerless compute. Runs your backend logic (Python) on-demand โ€” no server to patch or pay for while idle.Step 5 (code), Step 7 (deploy)Required
Amazon API GatewayManaged REST API front door. Routes HTTP requests to Lambda, enforces the API key, and (optionally) the WAF rate limit.Step 6 (key), Step 7 (deploy)Required
Amazon BedrockManaged foundation-model inference. Lambda calls Bedrock's API to run the Claude model and get a response โ€” you never host or fine-tune a model yourself.Step 3Required
AWS IAMIdentity and permissions. A dedicated github-deployer user grants GitHub Actions just enough access to deploy โ€” never broad account access.Step 2Required
AWS SAM (Serverless Application Model)Infrastructure-as-code framework, an extension of CloudFormation. Your infra/template.yaml declares every resource (Lambda, API Gateway, S3) in one file; SAM translates it into a CloudFormation stack and deploys it.Step 5 (template), Step 7 (deploy)Required
GitHub + GitHub ActionsSource control and CI/CD. A workflow file (.github/workflows/deploy.yml) runs SAM automatically whenever you push code, using the AWS credentials stored as repository secrets.Step 4 (repo), Step 5 (workflow file), Step 7 (run it)Required
Amazon CloudWatchLogging and monitoring. Every Lambda invocation writes its output (including errors) to a CloudWatch log group automatically โ€” no setup needed, it's on by default.Step 8 (reading logs)Automatic
Amazon CloudFrontGlobal CDN. Sits in front of S3 to provide HTTPS, edge caching, and (once configured) the only allowed path into your S3 bucket.Step 9.1Recommended
AWS Certificate Manager + Route 53TLS certificates and DNS. Issues a free HTTPS certificate and points your own domain name at CloudFront.Step 9.2Optional
AWS WAFWeb application firewall. A managed rule set plus a custom rate limit, attached to the API Gateway stage, to block bots and abusive traffic.Step 9.3Optional
Amazon DynamoDBManaged NoSQL database. Stores chatbot conversation history keyed by a session ID, with automatic expiry via TTL.Step 9.4Chatbot apps only
KiroAI coding assistant (not an AWS service). Generates your frontend, Lambda functions, SAM template, and GitHub Actions workflow from your PartyRock widget map โ€” this is how "no coding required" is actually true.ThroughoutRequired

โ‘  Request Lifecycle โ€” A Visitor Uses Your App

๐Ÿง‘ Visitor's
Browser
โ†’
S3
your website files
โ†“ page loads, then asks the AI something
๐Ÿง‘ Visitor's
Browser
โ†’
API Gateway
checks your API key
โ†’
Lambda
your AI logic, from your widgets
โ†’
Bedrock
Claude generates the response
  1. The browser requests index.html and its assets directly from S3 (Steps 1โ€“8, plain http://) or via CloudFront (Step 9+, https://). Either way these are static files โ€” no server-side rendering.
  2. The visitor fills in a field and submits. Client-side JavaScript sends a fetch() POST request to your API Gateway URL, with the API key attached as an x-api-key header.
  3. API Gateway validates the key against a usage plan tied to the API_KEY_VALUE you set in Step 6. No match โ†’ the request is rejected with 403 Forbidden before it ever reaches your code. A match โ†’ it's routed to your Lambda function.
  4. Lambda runs your Python handler. On a "cold start" (first call in a while) AWS has to provision a fresh execution environment first โ€” this is the 10โ€“15 second delay the FAQ describes; a "warm" container responds in 1โ€“3 seconds. The handler contains the same prompt/logic each PartyRock widget had.
  5. Lambda calls Bedrock's inference API with that prompt and the chosen Claude model ID. Bedrock runs the model and returns the generated text (or, for a chatbot, continues an existing conversation).
  6. The response flows back: Bedrock โ†’ Lambda โ†’ API Gateway โ†’ browser, where your frontend JavaScript renders it into the page.

๐Ÿ”’ Step 9 adds CloudFront in front of S3 and (if you do Step 9.4's "Lock down S3") restricts the bucket so it's only reachable through CloudFront โ€” direct S3 requests get blocked. This is a manual, one-time console step; GitHub Actions never redeploys it for you.

โ‘ก Deployment Lifecycle โ€” You Update Your Code

๐Ÿง‘ You
โ†’
GitHub
git push
โ†’
GitHub Actions
runs automatically
โ†’
SAM
builds + deploys
โ†’
CloudFormation
creates/updates resources
  1. You (or Kiro, on your instruction) edit a file โ€” a Lambda prompt, the frontend, or template.yaml โ€” and upload it to GitHub (or, if working locally, git push).
  2. A GitHub Actions workflow, defined in .github/workflows/deploy.yml, triggers automatically on that push (or on manual "Run workflow" in Step 7). It authenticates to AWS using the AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY secrets from Step 6 โ€” this is what the github-deployer IAM user from Step 2 is for.
  3. The workflow runs SAM Build, which packages your Lambda code and its dependencies into deployable artifacts, uploading them to the SAM_DEPLOY_BUCKET S3 bucket from Step 2.
  4. It then runs SAM Deploy, which reads infra/template.yaml and hands it to CloudFormation โ€” AWS's declarative "make reality match this file" engine that SAM is built on top of. CloudFormation diffs your template against what's currently deployed and creates or updates only what changed (Lambda functions, the API Gateway API, IAM roles, the S3 bucket).
  5. Finally the workflow syncs your frontend/ files straight to the S3 bucket (not through CloudFormation โ€” this is a plain file upload) and prints both the API URL and the Frontend URL.

You never click around the AWS Console to ship a change. This exact sequence is what Step 7 (first deploy) and Step 10 (every update after) both run โ€” the only difference is CloudFormation has less work to do on an update, since most resources already exist and just get modified in place.

The Steps

โ“
FAQ
Common questions and answers
๐Ÿงช
Lab Sandbox Guide
AWS Skill Builder, Vocareum, Academy
โœจ
Start Here โ€” App Planner
Fill in your PartyRock app details and get a ready-to-paste Kiro prompt + spec plan generated automatically.
โ€บ
1

Read Your PartyRock Widgets

โฑ 10 min

Before we build anything, we need to understand what your PartyRock app does. Every app is made of "widgets." We need to write down each one.

Open Your App in Edit Mode

  1. Go to partyrock.aws and sign in
  2. Click on your app to open it
  3. Click the Edit button in the top right corner
Top right of the screen shows buttons: "Remix", "Edit", "Share". Click the pencil icon labeled Edit.

The 5 Widget Types

Widget TypeWhat it looks likeWhat it does
User InputEmpty text boxUser types something here
Text Generation โœจGreen box with sparkle iconAI generates text
Image Generation ๐Ÿ–ผ๏ธGreen box with image iconAI generates an image
Chatbot ๐Ÿ’ฌChat bubble interfaceBack-and-forth conversation
Document ๐Ÿ“„File upload areaUser uploads a file

Fill In This Widget Map

For each widget, click the โœ๏ธ edit icon and note down:

Widget #1
  Type:       [ User Input / Text Generation / Image / Chatbot / Document ]
  Title:      ________________________________
  Prompt:     ________________________________
  References: ________________________________ (other widgets it uses)
On Mac press Cmd + Shift + 4 to take a screenshot. On Windows press Windows + Shift + S. Screenshot each widget's settings panel.

โœ… Checkpoint

2

Set Up Your AWS Account

โฑ 15 min
You need a credit card to sign up. Everything in this tutorial stays within the AWS Free Tier โ€” charges are near $0 for a personal app.

Create an AWS Account

  1. Go to aws.amazon.com
  2. Click the orange "Create an AWS Account" button (top right)
  3. Enter your email and choose an account name (e.g. "my-ai-apps")
  4. Verify your email, create a password, add payment info, verify phone
  5. Select Basic support โ€” Free and complete sign up
Orange "Create an AWS Account" button in the top right of the aws.amazon.com homepage.

Create an IAM User

We create a limited user called github-deployer that GitHub will use to deploy your app.

  1. Sign in at console.aws.amazon.com
  2. Search for IAM in the top search bar and click it
  3. Click Users in the left sidebar โ†’ Create user
  4. Username: github-deployer โ†’ click Next
  5. Select Attach policies directly
  6. Search for and check each of these 6 policies:
Each policy appears as a row with a checkbox on the left. Check the box next to each policy name listed above.

Create an Access Key

  1. Click on the github-deployer user
  2. Click the Security credentials tab
  3. Scroll to Access keys โ†’ Create access key
  4. Select Application running outside AWS โ†’ Next โ†’ Create
  5. Copy and save both values somewhere safe:
The Secret Access Key is only shown ONCE. Save it now before closing this page.
ValueLooks like
Access Key IDAKIAIOSFODNN7EXAMPLE
Secret Access KeywJalrXUtnFEMI/K7MDENG/bPxRfiCY...

Create an S3 Bucket for Deployments

  1. Search for S3 in the AWS Console and click it
  2. Click Create bucket
  3. Bucket name: yourname-sam-deploy-2026 (must be globally unique)
  4. Region: Asia Pacific (Malaysia) ap-southeast-5
  5. Leave all other settings as default โ†’ Create bucket
  6. Save the bucket name โ€” you'll need it later

โœ… Checkpoint

3

Enable Bedrock AI Models

โฑ 5 min

Amazon Bedrock is the AI service that powers your app. By default, AI models are not enabled โ€” you have to turn them on. It's free to request.

Open Amazon Bedrock

  1. In the AWS Console search bar, type Bedrock and click it
  2. Check the region in the top right and choose Asia Pacific (Malaysia) โ€” ap-southeast-5. Use this same region for everything in this tutorial.
Top right of the console shows a region name. Click it and select "Asia Pacific (Malaysia)".

Request Model Access

  1. In the left sidebar, click Model access
  2. Click Manage model access (top right of the table)
  3. Find the Anthropic section
  4. Check the box next to Claude Haiku 4.5 (recommended โ€” fast, low cost, works in every sandbox account)
  5. Optionally also try Claude Haiku 5.5 or Claude Sonnet 5.5. They are newer and more capable, but AWS enables them per account, so they may answer "not available for this account". If so, stay on Haiku 4.5
  6. Scroll down and click Save changes
A list of model providers. Under "Anthropic" you see checkboxes for different Claude models. Check "Claude Haiku 4.5".
Claude Haiku 4.5 is the recommended default: fast, cost-efficient, and available in every sandbox account. In Malaysia, Claude models are called through a global inference profile, so your code uses the ID global.anthropic.claude-haiku-4-5-20251001-v1:0 (not the plain anthropic.โ€ฆ ID). Other IDs: global.anthropic.claude-haiku-5-5 and global.anthropic.claude-sonnet-5-5 (AWS enables these per account, they may be refused), and global.amazon.nova-2-lite-v1:0 (always works). If you get "Model use case details have not been submitted", your account is new: the one-time Anthropic form is still needed in the Bedrock console (Malaysia region), then wait up to 15 minutes.
Claude Opus models are blocked in sandbox accounts. Claude 3 Haiku and Llama 3 are not offered in Malaysia, and Bedrock image-generation models are not available there either. If your app has an image widget, ask Kiro to call the image model in us-west-2 (Oregon, also allowed in the sandbox) and check it in the Playground first.

Wait for Approval

Refresh the Model access page every few minutes. When the status shows a green checkmark and says Access granted, you're ready. Most requests are approved instantly.

The model row shows a green checkmark icon in the "Access status" column next to Claude Haiku 4.5.

Try the Model in Bedrock Playground

Before building your app, test the model to make sure it works for your use case.

  1. In the left sidebar, click Playgrounds โ†’ Chat
  2. In the model selector (top), choose Claude Haiku 4.5
  3. Type a prompt related to your app idea and click Run
  4. Verify the response is useful for your project
๐Ÿ’ก If the model asks you to submit a use case before access is granted, fill in the form with a brief description of your project (e.g., "Student hackathon project โ€” building an AI chatbot for environmental awareness"). Approval is usually instant.

โœ… Checkpoint

4

Set Up GitHub

โฑ 10 min

GitHub is where your code lives. Every time you save code there, it automatically deploys to AWS. No technical knowledge needed to use it for this tutorial.

Create a GitHub Account

  1. Go to github.com and click Sign up
  2. Enter your email, create a password, choose a username
  3. Verify your email address
  4. Select the Free plan

Create a New Repository

  1. Click the + icon in the top right corner
  2. Click New repository
Top right of GitHub shows a "+" icon. Clicking it shows a dropdown with "New repository" as the first option.
  1. Repository name: my-partyrock-app
  2. Visibility: select Public
  3. Check Add a README file
  4. Click Create repository

โœ… Checkpoint

5

Upload Your App Code to GitHub

โฑ 10 min

Upload the files Kiro generated for you. No Git commands needed โ€” just drag and drop in the browser.

If you haven't generated your app code yet, open Kiro, share your widget map from Step 1, and say: "Build me a working AWS app from these PartyRock widgets." Kiro generates all files automatically.

Your File Structure

your-app/
โ”œโ”€โ”€ frontend/
โ”‚   โ””โ”€โ”€ index.html
โ”œโ”€โ”€ backend/
โ”‚   โ””โ”€โ”€ lambda/
โ”‚       โ””โ”€โ”€ (your Python files)
โ”œโ”€โ”€ infra/
โ”‚   โ””โ”€โ”€ template.yaml
โ””โ”€โ”€ .github/
    โ””โ”€โ”€ workflows/
        โ””โ”€โ”€ deploy.yml

Upload Your Files

GitHub's web interface does not support dragging an entire folder. You need to upload the files inside each folder, not the folder itself. Use "Create new file" to set the path.

Upload the frontend files

  1. Click Add file โ†’ Upload files
  2. On your computer, open the frontend folder and drag index.html into the upload area
  3. Commit message: Add frontend files โ†’ Commit changes

Upload the backend Lambda files

  1. Click Add file โ†’ Create new file
  2. In the filename box, type the full path: backend/lambda/your_function.py
  3. Open the .py file on your computer, copy all contents, paste into the text area
  4. Commit message: Add Lambda function โ†’ Commit new file
  5. Repeat for each Lambda .py file
The filename input shows "backend/lambda/calorie_scanner.py" typed in. GitHub creates the folder structure automatically as you type the slashes.

Upload the infrastructure template

  1. Click Add file โ†’ Create new file
  2. Filename: infra/template.yaml
  3. Copy the contents of your template.yaml file and paste into the text area
  4. Commit message: Add infrastructure template โ†’ Commit new file

Upload the GitHub Actions workflow

  1. Click Add file โ†’ Create new file
  2. In the filename box, type exactly: .github/workflows/deploy.yml
  3. Paste the contents of your deploy.yml file into the text area
  4. Click Commit new file
The filename input shows ".github/workflows/deploy.yml" typed in. GitHub automatically creates the folder structure as you type the slashes.

โœ… Checkpoint

6

Add Credentials + API Key to GitHub

โฑ 15 min

GitHub needs permission to deploy to your AWS account. We add "secrets" โ€” private values that GitHub keeps hidden and uses automatically. One of these secrets is also what locks down your API, so random strangers can't rack up your AWS bill by calling it directly.

Secrets are encrypted and never visible to anyone after saving โ€” not even to you. This is safe and the standard way to do this.

Open Repository Secrets

  1. In your GitHub repository, click the Settings tab
  2. In the left sidebar, click Secrets and variables
  3. Click Actions in the submenu
Left sidebar shows "Secrets and variables" which expands to show "Actions". Click Actions.

Make Up an API Key Value

Your API key isn't something AWS generates for you ahead of time โ€” you pick the value yourself, right now, and your deployment uses that exact value to lock the API. Anyone calling your API without this exact value gets rejected.

  1. Make up a random string at least 20 characters long โ€” mash your keyboard, or use a free generator like a password generator site (no account needed)
  2. Save it somewhere โ€” you'll paste this same value into your frontend code in Step 8
Don't use a real password or anything you reuse elsewhere โ€” this value ends up readable in your frontend's JavaScript, since there's no server to hide it behind. Treat it as a "shared secret between your frontend and your API," not a real password.

Add the 5 Secrets

Click New repository secret for each one:

Secret Name (type exactly)Value
AWS_ACCESS_KEY_IDYour Access Key ID from Step 2
AWS_SECRET_ACCESS_KEYYour Secret Access Key from Step 2
SAM_DEPLOY_BUCKETYour S3 bucket name from Step 2
AWS_REGIONThe same region you enabled Bedrock in during Step 3 (e.g. ap-southeast-5)
API_KEY_VALUEThe random string you just made up above
After adding all 5, the "Repository secrets" section shows a list of 5 secrets with "Updated X minutes ago" next to each. The actual values are hidden โ€” this is correct.

โœ… Checkpoint

7

Run the Deployment

โฑ 5 min

Now we press the launch button. GitHub Actions will connect to AWS, create all the services, and give you a live URL. Takes about 3โ€“5 minutes.

Trigger the Deployment

  1. In your GitHub repository, click the Actions tab
  2. In the left sidebar, click your workflow name (e.g. "Deploy Health Tracker")
  3. Click the Run workflow button on the right
  4. Click the green Run workflow button in the popup
Right side of the Actions page shows a "Run workflow" dropdown button. Click it, then click the green "Run workflow" button in the small popup.

Watch It Run

  1. Refresh the page โ€” a new row appears with a yellow spinning circle
  2. Click that row, then click the deploy job
  3. Watch each step get a green โœ… checkmark
The job detail page shows a list of steps. Each step shows a spinning circle while running, then turns into a green checkmark when done.

What Each Step Does

StepWhat is happening
CheckoutDownloads your code files
Configure AWS credentialsConnects to your AWS account
Setup SAM CLIInstalls the deployment tool
SAM BuildPackages your Lambda functions
SAM DeployCreates Lambda, API Gateway, S3 in AWS
Upload frontendPuts your website on S3
Print URLsShows you the live links

If Something Goes Wrong

Error messageFix
Credentials could not be loadedCheck your secrets in Step 6 โ€” no spaces in the values
Bucket does not existCheck SAM_DEPLOY_BUCKET matches your S3 bucket name exactly
Access deniedMake sure all 6 IAM policies are attached to github-deployer
Model not foundGo back to Step 3 and confirm Bedrock access is granted

โœ… Checkpoint

8

Visit, Test, and Monitor Your Live App

โฑ 15 min

Find Your Live URL

  1. Go to the Actions tab in GitHub
  2. Click your most recent successful deployment run
  3. Click the deploy job
  4. Scroll to the last step: Print URLs and expand it
  5. Copy both the Frontend URL and the API URL
The "Print URLs" step shows two lines: "โœ… API URL: https://..." and "โœ… Frontend URL: http://...". Copy both.

Add Your API Key to the Frontend

Your app won't work yet โ€” the frontend doesn't know the API key you chose in Step 6. We paste it in now.

  1. Open Kiro, share your frontend/index.html file
  2. Ask: "Set the API_KEY constant (or equivalent) to [paste your API_KEY_VALUE from Step 6], and set the API URL to [paste your API URL from above]."
  3. Kiro updates the file for you โ€” review the change, then save it
  4. Upload the updated index.html to GitHub the same way you did in Step 5 โ€” this triggers an automatic redeploy
  5. Wait for the GitHub Action to finish (watch the Actions tab, same as Step 7)
If you skip this step, every request from your frontend will be rejected with a 403 error โ€” the API key your browser sends won't match what API Gateway expects.

Open and Test Your App

  1. Paste the Frontend URL into a new browser tab
  2. Fill in the input fields
  3. Click Run All
  4. Wait 5โ€“10 seconds โ€” the AI output areas fill with responses

Check Your Logs (If Something's Wrong)

If a request fails or the output looks wrong, your Lambda function's logs usually show exactly why.

  1. In the AWS Console, search for CloudWatch and click it
  2. In the left sidebar, click Log groups
  3. Find the log group named /aws/lambda/your-function-name and click it
  4. Click the most recent log stream โ€” the entries are your Lambda's output, newest at the bottom
A 403 error in the browser almost always means the API key in your frontend (previous section) doesn't exactly match API_KEY_VALUE from Step 6 โ€” check for typos or extra spaces.

Share It

Your app URL works for anyone in the world โ€” no AWS or PartyRock account needed. Just share the link.

Use bit.ly to shorten the long URL into something easy to share.

Before vs. After

PartyRockYour App
Requires loginโœ… YesโŒ No
Custom designโŒ Noโœ… Yes
You own itโŒ Noโœ… Yes
Share with anyoneLimitedโœ… Yes
Custom domainโŒ Noโœ… Yes
๐ŸŽ‰

You Did It!

Your PartyRock app is now a real, published web application running on AWS. Anyone in the world can use it.

โœจ

App Planner โ€” Build Your Kiro Prompt

Fill in the details of your PartyRock app below. The vibe prompt on the right updates live as you type โ€” no AI call needed. When you're done, click Copy and paste it straight into Kiro chat with your screenshots. Kiro generates everything in one shot.

1. App Info


2. Widgets

Open each widget's โœ๏ธ edit panel in PartyRock and copy the details here.


3. Extra Notes (optional)

Live Preview

๐Ÿ“‹ Kiro Vibe Prompt โ€” ready to paste into Kiro chat
Fill in the form on the left to build your prompt...
HOW TO USE THIS PROMPT
1Fill in all fields on the left โ€” prompt updates live
2Click Copy when the prompt looks complete
3Open Kiro โ†’ start a new chat โ†’ paste the prompt
4Drag your PartyRock screenshots into the same message
5Send โ€” Kiro generates all your app files in one shot
6Follow Steps 2โ€“8 of this tutorial to deploy to AWS
๐Ÿงช

Deploying in an AWS Lab Sandbox

โฑ ~45 min
This guide is for restricted AWS lab environments โ€” such as Innovation Sandbox on AWS (ISB), AWS Skill Builder labs, Vocareum, AWS Academy, or event/workshop sandboxes. These environments give you temporary AWS credentials with limited permissions. You do not create an AWS account โ€” credentials are provided for you.
Your lease expired, or you were given a new sandbox account, and your app stopped working? Follow the Redeploy guide to get it running again in about 20 minutes.

What Kind of Sandbox Do You Have?

EnvironmentWhere credentials appearSession length
Innovation Sandbox on AWS (ISB)ISB Web UI โ†’ Lease details โ†’ "Access Account" (SSO) or CLI credentialsConfigured by admin (hoursโ€“days)
AWS Skill Builder (Jam / Lab)Lab panel โ€” "AWS Details" button1โ€“4 hours
Vocareum (AWS Academy)"AWS Details" or "Account Details" button1โ€“4 hours
AWS Workshop StudioLeft panel โ€” "Get AWS CLI credentials"Duration of workshop
Event Engine (re:Invent etc.)Team dashboard โ€” "AWS Console" linkDuration of event
Qwiklabs / Google-hosted AWS labsLeft panel โ€” "Connection Details"Per-lab timer

Using Innovation Sandbox on AWS (ISB)

Innovation Sandbox on AWS is an AWS Solution that provides managed, temporary sandbox accounts through IAM Identity Center. Your administrator provisions accounts with budget limits and time-based leases. When your lease expires, the account is automatically cleaned up and recycled.

How ISB Works

๐Ÿ”‘

SSO Login

Access via IAM Identity Center โ€” no static keys needed

โฑ๏ธ

Time-Limited Lease

Account auto-expires after configured duration

๐Ÿ’ฐ

Budget Controls

Spend limits enforced โ€” you get alerts before hitting the cap

๐Ÿ”„

Auto Cleanup

AWS Nuke removes all resources when lease ends

Getting Your ISB Sandbox Credentials

  1. Log in to the Innovation Sandbox Web UI at aws-sandbox.eliteacademy.id
  2. Request a new lease or use an existing active lease
  3. Once approved, click "Access Account" to open the AWS Console via SSO
  4. For CLI/programmatic access: click your lease โ†’ "Get CLI Credentials"
  5. Copy the three values: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN
The ISB web UI shows your active lease with account ID, remaining budget, and time left. Click "Access Account" for console access or use the CLI credentials section for programmatic access.
ISB credentials are temporary (session tokens). They expire when your lease ends or when the SSO session times out. If deployment fails with ExpiredTokenException, get fresh credentials from the ISB UI.

ISB-Specific Considerations

FeatureISB BehaviorImpact on This Tutorial
IAM RolesSCPs may restrict role creationUse the ISB-provided execution role instead of creating github-deployer
Bedrock AccessMay need admin to enable via blueprintAsk your ISB admin to enable Bedrock model access in the sandbox OU SCP
RegionMay be restricted by SCPDeploy in the region allowed by your ISB configuration
BudgetLease has a spend limitBedrock costs ~$0.003/request โ€” unlikely to hit budget limits for this tutorial
CleanupAll resources deleted when lease expiresYour app will stop working after lease ends โ€” export code to GitHub first
BlueprintsAdmin can pre-deploy infrastructureIf a Bedrock blueprint exists, your Lambda role may already have permissions
Ask your ISB administrator if they have a Bedrock blueprint registered. If so, your sandbox account may already have the correct IAM roles and Bedrock model access pre-configured โ€” you can skip Steps 2 and 3 of the main tutorial.
All of these give you the same three values: Access Key ID, Secret Access Key, and sometimes a Session Token. You will need all three.

What Is Restricted in a Sandbox

Sandbox environments intentionally limit what you can do. Here is what that means for this tutorial:

RestrictionImpactOur workaround
Cannot create IAM usersNo github-deployer userUse the sandbox credentials directly as GitHub secrets
Cannot create IAM roles freelySAM template may fail on IAMUse pre-existing LabRole or pass --role-arn to SAM
Session token requiredStandard key+secret won't work aloneAdd AWS_SESSION_TOKEN as a fourth GitHub secret
Credentials expireDeployment fails after session endsRe-run deployment before session expires, or re-enter fresh credentials
Bedrock may not be pre-enabledModel access request may be blockedCheck if lab pre-enables Bedrock, or use a model that is already available
S3 bucket names may be pre-setCannot choose any bucket nameUse the lab-provided bucket name or prefix
Region may be lockedMust deploy to a specific regionCheck the lab instructions โ€” in our sandbox use ap-southeast-5 (Malaysia)

Step-by-Step: Deploy From a Sandbox

1
Get Your Sandbox Credentials

In your lab environment, find the credentials panel. It is usually a button labeled AWS Details, Account Details, or Get CLI credentials.

Copy these three values:

ValueExample format
AWS Access Key IDASIA... (starts with ASIA, not AKIA)
AWS Secret Access KeyLong random string
AWS Session TokenVery long string โ€” copy the entire thing
Session tokens are very long โ€” make sure you copy the entire value. Missing even one character will cause authentication to fail.
2
Check What Region and Services Are Available

In the AWS Console (opened from your lab panel), check:

  1. The region shown in the top right โ€” note it down (e.g. ap-southeast-5)
  2. Go to Amazon Bedrock โ†’ Model access โ€” check if Claude models show Access granted
  3. Go to S3 โ€” check if you can create buckets, or if one is pre-created for you
  4. Go to IAM โ†’ Roles โ€” look for a role named LabRole or EMR_EC2_DefaultRole โ€” copy its ARN
IAM โ†’ Roles page shows a list of roles. Find "LabRole" and click it. The role ARN is shown at the top โ€” looks like arn:aws:iam::123456789012:role/LabRole. Copy it.
3
Enable Bedrock Model Access (if not pre-enabled)

In the AWS Console โ†’ Amazon Bedrock โ†’ Model access โ†’ Manage model access.

If the lab restricts model access requests, look for models already showing Access granted. Common pre-enabled models in labs:

  • Amazon Titan Text Express
  • Claude Instant (older labs)
  • Claude 3 Sonnet or Haiku (newer labs)
If Claude is not available, use Amazon Nova 2 Lite โ€” update the model ID in your Lambda functions to global.amazon.nova-2-lite-v1:0.
4
Create an S3 Bucket for SAM Artifacts

In the AWS Console โ†’ S3 โ†’ Create bucket.

  • Name: lab-sam-deploy-[your-initials]-[random-4-digits]
  • Region: same as your lab region
  • Leave all other settings as default โ†’ Create bucket
If S3 bucket creation is blocked, check if the lab pre-created a bucket. Look in S3 for any existing buckets โ€” use one of those and note its name.
5
Update the SAM Template for Sandbox Restrictions

Sandbox environments usually block SAM from creating IAM roles automatically. You need to tell SAM to use the existing LabRole instead.

In your infra/template.yaml, find the LambdaBedrockRole resource and replace it with a reference to the lab role:

# REMOVE the AWS::IAM::Role resource block entirely
# Then update each Lambda function to use the LabRole ARN:

CalorieScannerFunction:
  Type: AWS::Serverless::Function
  Properties:
    Role: arn:aws:iam::YOUR_ACCOUNT_ID:role/LabRole
    # ... rest of properties
Find your Account ID in the AWS Console top right โ€” click your account name, it shows a 12-digit number like 123456789012.

Also update the SAM deploy command in .github/workflows/deploy.yml โ€” remove CAPABILITY_NAMED_IAM since you are no longer creating IAM resources:

sam deploy \
  --stack-name my-partyrock-app \
  --s3-bucket ${{ secrets.SAM_DEPLOY_BUCKET }} \
  --region ${{ secrets.AWS_REGION }} \
  --no-confirm-changeset \
  --no-fail-on-empty-changeset
6
Set Up GitHub and Add 4 Secrets (not 3)

Follow Step 4 to create a GitHub account and repository, and Step 5 to upload your files.

Then in GitHub โ†’ Settings โ†’ Secrets and variables โ†’ Actions, add 4 secrets (sandbox needs the session token too):

Secret Name (type exactly)Value
AWS_ACCESS_KEY_IDAccess Key ID from your lab panel
AWS_SECRET_ACCESS_KEYSecret Access Key from your lab panel
AWS_SESSION_TOKENSession Token from your lab panel โ€” the full long string
SAM_DEPLOY_BUCKETS3 bucket name you created in step 4
Session tokens expire when your lab session ends. If you need to redeploy after the session expires, you must update all 3 credential secrets with fresh values from a new lab session.
7
Update the GitHub Actions Workflow for Session Token

The default deploy.yml does not pass the session token. You need to add it.

In your .github/workflows/deploy.yml, find the Configure AWS credentials step and add the session token line:

- name: Configure AWS credentials
  uses: aws-actions/configure-aws-credentials@v4
  with:
    aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
    aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
    aws-session-token: ${{ secrets.AWS_SESSION_TOKEN }}   # โ† add this line
    aws-region: ap-southeast-5
8
Run the Deployment

Follow Step 7 โ€” go to the Actions tab in GitHub, click your workflow, click Run workflow.

Watch for these sandbox-specific errors:

ErrorFix
ExpiredTokenExceptionYour lab session expired. Start a new lab session and update all 3 credential secrets with fresh values.
AccessDenied: iam:CreateRoleRemove the IAM role from template.yaml and use LabRole ARN instead (Step 5 above).
AccessDenied: bedrock:InvokeModelThe LabRole may not have Bedrock permissions. Ask your lab instructor, or check if a different role has Bedrock access.
BucketAlreadyExistsThe S3 bucket name is taken. Add more random characters to the bucket name.
No changes to deployThis is fine โ€” your stack is already up to date.
Bedrock model not foundThe model is not enabled in this lab, or you used a plain model ID. Use the global. ID, for example global.anthropic.claude-haiku-4-5-20251001-v1:0 or global.amazon.nova-2-lite-v1:0.
9
Visit Your Live App

Follow Step 8 โ€” find the Frontend URL in the GitHub Actions Print URLs step and open it in your browser.

Your app will stop working when the lab session expires because the Lambda functions use temporary credentials. To keep the app running permanently, you need a personal AWS account (follow the main tutorial path).

Sandbox Limitations Summary

FeaturePersonal AWS AccountLab Sandbox
Account creation requiredYesNo โ€” provided for you
Credit card requiredYesNo
App stays live permanentlyYesNo โ€” expires with session
Full IAM controlYesNo โ€” restricted to LabRole
Choose any regionYesNo โ€” lab region only
Bedrock model choiceAny modelOnly pre-enabled models
Session token neededNoYes โ€” 4th GitHub secret
Good for learningYesYes โœ…
9

Make It Production-Ready

โฑ 20โ€“45 min

This step covers important upgrades. CloudFront (HTTPS) is RECOMMENDED for everyone. The rest are optional depending on your app.

9.1 Add HTTPS with CloudFront RECOMMENDED

Right now your app URL starts with http:// โ€” no padlock. Most browsers show a "Not Secure" warning, and copy buttons only work on HTTPS pages. CloudFront gives you HTTPS for free.

  1. In the AWS Console, search for CloudFront โ†’ Create a CloudFront distribution
  2. For Origin domain, select your frontend S3 bucket (the .s3-website.ap-southeast-5.amazonaws.com endpoint โ€” note the dot after s3-website in Malaysia)
  3. For Viewer protocol policy, select Redirect HTTP to HTTPS
  4. Leave all other settings as default โ†’ Create distribution
  5. Wait 5โ€“10 minutes for status to change to Enabled
  6. Copy the Distribution domain name (e.g. d1234abcd.cloudfront.net) โ€” this is your new HTTPS URL
The distribution appears in the list with status "Deploying", then "Enabled". The Distribution domain name column shows your new URL.

Lock down S3 to CloudFront only

  1. Go to S3 โ†’ your frontend bucket โ†’ Permissions tab โ†’ Edit bucket policy
  2. Ask Kiro: "Generate an S3 bucket policy that only allows access from my CloudFront distribution. My bucket name is [name], my account ID is [ID], my distribution ID is [ID]."
  3. Paste the policy Kiro generates โ†’ Save changes

9.2 Add a Custom Domain (Optional)

Want www.myapp.com instead of a long CloudFront URL? You need to own a domain name first (~$10โ€“12/year).

  1. AWS Console โ†’ Certificate Manager (must be in us-east-1 for CloudFront) โ†’ Request a certificate
  2. Enter your domain โ†’ DNS validation โ†’ Request
  3. Click Create records in Route 53 โ†’ wait for status Issued
  4. CloudFront โ†’ your distribution โ†’ Edit โ†’ add your domain as Alternate domain name โ†’ select your certificate โ†’ Save
  5. Route 53 โ†’ Hosted zones โ†’ your domain โ†’ Create record โ†’ type A โ†’ Alias โ†’ CloudFront distribution โ†’ Create

9.3 Add AWS WAF Rate Limiting (Optional)

Blocks bots and prevents abuse. Costs ~$5/month.

  1. AWS Console โ†’ WAF & Shield โ†’ Create web ACL
  2. Resource type: Regional โ†’ Region: ap-southeast-5 โ†’ Name: my-app-waf
  3. Add rules โ†’ Add managed rule groups โ†’ enable AWSManagedRulesCommonRuleSet
  4. Add your own rule โ†’ Rate-based โ†’ limit: 100 per 5 min โ†’ Action: Block
  5. Create web ACL โ†’ then attach to API Gateway: API Gateway โ†’ your API โ†’ Stages โ†’ click your deployed stage (usually named Prod) โ†’ WAF tab โ†’ select your ACL

9.4 Add Chat Session Persistence (Chatbot Apps Only)

Without this, the AI forgets the conversation every time the user sends a message.

  1. AWS Console โ†’ DynamoDB โ†’ Create table
  2. Table name: my-app-chat-sessions โ€” Partition key: session_id (String) โ†’ Create table
  3. Open Kiro, share your chatbot Lambda function, ask: "Update this Lambda to store and retrieve conversation history from DynamoDB table my-app-chat-sessions, keyed by session_id. Add a 24-hour TTL."
  4. Open Kiro, share your Lambda's IAM role name, and ask: "Generate an IAM policy that only allows GetItem, PutItem, UpdateItem, and DeleteItem on my DynamoDB table my-app-chat-sessions, not full DynamoDB access." Attach the generated policy via IAM โ†’ your Lambda role โ†’ Add permissions โ†’ Create inline policy
  5. Open Kiro, share index.html, ask: "Generate a unique session_id on page load and include it in every chat API request. Add a Clear Chat button."
  6. Upload updated files to GitHub โ†’ redeploy
DynamoDB โ€” a database โ€” stores each conversation. "Partition key" is just the unique ID for each conversation. "TTL" means Time To Live โ€” old conversations are automatically deleted after 24 hours.

9.5 Large File Uploads (File Upload Apps Only)

Default behaviour: The generated app reads files in the browser using FileReader, converts to base64, and sends directly in the Lambda request body. This works for files up to about 4MB โ€” a Lambda request can be at most 6MB and base64 adds ~33% overhead. Most photos, PDFs, DOCX, and CSV files fall within this limit; for bigger files, shrink or split them first.

Only needed for files larger than ~15MB:

  1. Open Kiro, share your infra/template.yaml and file-handling Lambda
  2. Ask: "Add a presigned URL upload endpoint. I need a Lambda that generates a presigned S3 PUT URL, and update the frontend to use it for files larger than 15MB. Store uploads in a new S3 bucket called my-app-uploads."
  3. Upload all changed files to GitHub โ†’ redeploy
10

Update Your App After It's Live

โฑ 5 min

Every time you save a change to GitHub, your app redeploys automatically. No AWS Console needed.

How to Update a Prompt

  1. Open Kiro, share the Lambda file you want to update (e.g. backend/lambda/calorie_scanner.py)
  2. Describe the change: "Update the prompt to also recommend a complementary exercise"
  3. Kiro edits the file
  4. In GitHub, navigate to the file โ†’ click the pencil icon โ†’ select all โ†’ paste the updated content โ†’ Commit changes
  5. GitHub Actions redeploys automatically โ€” done in 3โ€“5 minutes
After committing, the Actions tab shows a new deployment running automatically within seconds.

How to Update the Frontend

  1. Open Kiro, share frontend/index.html
  2. Describe the change: "Change the background color to dark blue" or "Make the Run All button larger"
  3. In GitHub, navigate to frontend/index.html โ†’ pencil icon โ†’ select all โ†’ paste โ†’ Commit changes

How to Roll Back a Broken Change

  1. In GitHub, click on the file you changed โ†’ click the History (clock) icon
  2. Click the commit before your broken change โ†’ click <> to view the old version
  3. Copy the old content โ†’ go back to the current file โ†’ edit โ†’ paste โ†’ Commit
If the deployment itself failed (not just a logic error), CloudFormation automatically rolls back to the last working version. Check CloudFormation โ†’ your stack โ†’ Status column.

How to Delete Your App

  1. AWS Console โ†’ CloudFormation โ†’ find your stack โ†’ check the box โ†’ Delete โ†’ confirm
  2. Also manually delete: the SAM artifacts S3 bucket, CloudWatch log groups, and CloudFront distribution (if applicable)
  3. Your GitHub repository and code are NOT deleted โ€” you can redeploy anytime
โ“

Frequently Asked Questions

Getting Started
Do I need to know how to code? +
No. You use Kiro (an AI assistant) to generate all the code, and GitHub's web interface to upload it. No coding required.
How long does this take? +
About 1.5โ€“2.25 hours for a complete deployment. Steps 1โ€“8 (a working app, no custom domain) take about 1.5 hours. Adding HTTPS and security hardening (Step 9) adds another 20โ€“45 minutes.
How much does it cost? +
For a personal app with low traffic (under 100 requests/day), it costs ~$0 โ€” covered by the AWS free tier. At 1,000 requests/day, expect ~$1โ€“3/month. The main cost is Bedrock (Claude) at roughly $0.003 per AI request.
Why do I need a credit card if it's free? +
AWS requires a credit card to verify your identity and prevent abuse. You will not be charged unless you exceed the free tier limits. To get an email if any charges appear: AWS Console โ†’ Billing and Cost Management โ†’ Budgets โ†’ Create budget โ†’ choose a small monthly amount (e.g. $5) โ†’ add your email for alerts.
Deployment
My deployment failed. What do I do? +
Click on the failed step in GitHub Actions to see the error message. Check the "If Something Goes Wrong" troubleshooting table in Step 7. Copy the error message and paste it into Kiro โ€” it will help diagnose the problem.
The deployment says "No changes to deploy." Is that an error? +
No โ€” it means your app is already up to date. This is fine.
My app deployed but the URL shows an error. What do I do? +
1. Check that the API key in your frontend matches API_KEY_VALUE from Step 6 (see Step 8's "Add Your API Key to the Frontend"). 2. Check CloudWatch logs (Step 8's "Check Your Logs") for error messages. 3. Make sure Bedrock model access is granted (Step 3).
The App
The first request is very slow (10โ€“15 seconds). Is something wrong? +
No โ€” this is called a "cold start." Lambda sleeps when not in use and takes a moment to wake up. Subsequent requests are much faster (1โ€“3 seconds).
My AI output shows symbols like **bold** instead of formatted text. +
Claude writes in markdown (the **bold** / ## heading style), but a plain web page doesn't render that automatically โ€” you need a small library to convert it to real HTML. Open Kiro, share your frontend/index.html, and ask: "Add the marked.js library from a CDN, and use it to render the AI output as formatted HTML instead of raw markdown text." Upload the updated file (same as Step 5) to redeploy.
The copy button doesn't work. +
Copy buttons require HTTPS. Add CloudFront (Step 9.1) to get HTTPS, then test again.
Bedrock returned an empty response (no error, just blank). +
Claude sometimes refuses to answer certain types of content due to its safety filters. This is not an error โ€” it is the model declining to respond. Try rephrasing your prompt to be more specific and less ambiguous.
How do I change what the AI says? +
Edit the prompt in your Lambda function file. See Step 10 for how to update and redeploy.
Security & Cost
Is my app secure? +
After completing Step 6/8 (API key) and Step 9.1 (CloudFront), your app has: API key authentication, HTTPS, input length limits, and scoped IAM permissions. For a personal app, this is solid. For a public app with many users, also add WAF (Step 9.3).
I got an unexpected AWS bill. What happened? +
The most common causes: 1. You left a resource running that is not in the free tier. 2. Your app received much more traffic than expected. 3. You have multiple stacks deployed. Go to AWS Console โ†’ Billing โ†’ Cost Explorer to see which service is charging you.
How do I stop all charges immediately? +
Delete your CloudFormation stack โ€” see the "Delete Your App" section at the end of Step 10. This removes Lambda, API Gateway, and S3.
Sandbox / Lab
My lab session expired and the app stopped working. What do I do? +
Start a new lab session, copy the new credentials (Key ID + Secret + Session Token), update all 3 credential secrets in GitHub, and redeploy. For the full walkthrough see the Redeploy guide.
My lab doesn't have Claude. What model can I use? +
Check Bedrock โ†’ Model access for models showing "Access granted." Amazon Nova 2 Lite (global.amazon.nova-2-lite-v1:0) is a good low-cost alternative. Update the model ID in your Lambda functions to match.
Still Stuck?
  1. Copy the exact error message and paste it into Kiro โ€” describe what step you were on
  2. Check the CloudWatch logs for your Lambda function (Step 8's "Check Your Logs")
  3. Re-read the "If Something Goes Wrong" troubleshooting table in Step 7
  4. Check the AWS Service Health Dashboard at status.aws.amazon.com for outages