Skip to content

Getting started

Subscribe, launch OpenCode Coding Assistant, run the local file-edit fixture, and then point OpenCode at a model you choose.

You need: an AWS account that can subscribe on AWS Marketplace, launch EC2, and open a Session Manager session. The AWS CLI and Session Manager plugin are required on your workstation only if you start the session from there.

Watch on YouTube.

1. Subscribe

Open the OpenCode Coding Assistant listing, choose View purchase options, review the terms, and subscribe. When the subscription is active, choose Launch your software.

2. Launch the instance

On the EC2 launch page:

  1. Choose t3.medium (4 GiB of memory) or larger, x86_64.
  2. Under Configure storage, use an encrypted gp3 root volume of at least 32 GiB. See the size note on the overview.
  3. Require IMDSv2.
  4. Attach an IAM instance profile that includes AmazonSSMManagedInstanceCore. Add Amazon Bedrock permission only when you use the Bedrock example in step 5.
  5. Leave inbound application ports closed. OpenCode does not listen for a browser.
  6. Choose Launch instance.

3. Connect

Wait until cloud-init and automatic first boot finish. In the EC2 console, select the instance, choose Connect, then Session Manager, then Connect. Or, from your workstation:

aws ssm start-session --target <instance-id>

Switch to the ubuntu user. The commands that follow run as ubuntu.

sudo -iu ubuntu

The listing documents Session Manager for the shell. It does not document an inbound SSH port for this image.

4. Run the walkthrough

Check the installed command, then run the fixture:

opencode --version
bash /opt/sushi/docs/demo.sh

The demo uses a localhost test provider. It edits files and checks the result with Python. It does not call a paid provider, and it does not show that a commercial model answered a task. Results are saved under ~/opencode-demo.

Verify the supplied inputs:

python3 /opt/opencode/inputs.py verify

First boot creates /var/lib/opencode/workspace/calculator.py and keeps that workspace on later boots. The first-boot unit is sushi-opencode-firstboot.service.

5. Use your own provider

Change to a project directory you can restore from a backup. Configure provider credentials in the OpenCode credential store after launch, or attach an instance role scoped to the model you call. Select the model on the command. The image ships with no provider key.

This example calls Amazon Nova Lite in us-east-1. The instance role must allow that model invocation, and model access must be enabled in the account. AWS_PROFILE=default makes the standard SDK use the temporary IMDSv2 role credentials. No AWS access keys are supplied.

AWS_REGION=us-east-1 AWS_PROFILE=default opencode run \
  --model amazon-bedrock/amazon.nova-lite-v1:0 \
  'Explain this calculator and suggest a small tested improvement'

OpenCode can change files. Read the diff and run your own tests before you keep the edit. Model usage is billed by the provider.

The image notes in /opt/sushi/docs/README.md describe this package. Next, read Configuration for the paths those commands use.

Last updated October 27, 2026 · Suggest an improvement