Skip to content

Prerequisites

ToolMinimum VersionPurpose
Terraform≥ 1.5Infrastructure provisioning
AWS CLI≥ 2.0Authentication and resource verification

Verify your installed versions:

Terminal window
terraform version
aws --version

Your AWS credentials must have permissions to create and manage:

ServiceResources
Amazon ECS

Cluster,

Express Gateway Service
The aws_ecs_express_gateway_service Terraform resource that provisions an ECS service with managed ALB, auto scaling, and simplified configuration for HTTP/HTTPS web applications and APIs.

, task definitions

VPC
Virtual Private Cloud — an isolated virtual network within AWS where resources are deployed.

VPC, subnets, Internet Gateway
A VPC component that enables communication between resources in a VPC and the internet.
, route tables, Security Group
A virtual firewall for EC2 instances and other resources that controls inbound and outbound traffic.

IAM

Task Execution Role
An IAM role assumed by ecs-tasks.amazonaws.com that grants ECS permissions to pull container images and write CloudWatch logs.
, Infrastructure Role
An IAM role assumed by ecs.amazonaws.com that grants ECS Express Mode permissions to provision ALB, networking, and auto scaling resources.
, Task Role
An IAM role assumed by ecs-tasks.amazonaws.com that grants the running container application-level permissions (Bedrock access in this project).

Elastic Load Balancing

Shared ALB
The Application Load Balancer shared by up to 25 Express services in the same VPC using Host header routing rules.
(managed by Express Mode)

The demo uses Amazon Bedrock
AWS fully managed service providing foundation models for generative AI applications.
for image analysis via a Foundation Model
A pre-trained large language or multimodal model available through Amazon Bedrock.
. Two conditions must be met:

  1. Open the Amazon Bedrock console
  2. Navigate to Model access
  3. Request access to Anthropic Claude models
  4. Wait for status to show Access granted

Your deployment region must support the chosen model. Check the Bedrock model support by region documentation.

The demo uses an Inference Profile
A Bedrock configuration that specifies model parameters and routing for inference requests.
to route requests to the correct endpoint.

terraform.tfvars
aws_region = "ap-southeast-2"