[bug] aws rhel-ai create: AMI architecture hard-coded to x86_64, ARM64 instance types fail

Open
#901 3 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
72/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
aws, go

Research direction

Start with pkg/provider/aws/action/rhel-ai/constants.go:25 and the AMI lookup and instance-selection logic in rhelai.go:136, 140, and 288-298. Compare CLI architecture handling in cmd/mapt/cmd/aws/hosts/rhelai.go with rhel.go:77, then trace RHELAIArgs.Arch and rhelAIRequest.arch. Done means ARM64 instance types select a matching AMI, or an --arch value is consistently supported through filtering and instance selection.

Written by the indexing model from the issue text.

Description

info-required os/RHEL-AI

When using aws rhel-ai create with ARM64 instance types (e.g. Graviton-based g5g.*), the provisioning fails because the AMI lookup is hard-coded to x86_64. The selected AMI architecture doesn't match the requested instance architecture.

Steps to Reproduce

mapt aws rhel-ai create \
  --project-name test \
  --backed-url file:///workspace \
  --conn-details-output /workspace \
  --version 3.4.0 \
  --spot --spot-eviction-tolerance medium \
  --compute-sizes g5g.xlarge,g5g.2xlarge,g5g.4xlarge

Error

error: sdk-v2/provider2.go:571: sdk.helper_schema: creating Auto Scaling Group (main-araid-asg-19f8de4):
operation error Auto Scaling: CreateAutoScalingGroup, api error ValidationError:
You must use a valid fully-formed launch template. The architecture 'arm64' of the specified instance type
does not match the architecture 'x86_64' of the specified AMI.

Root Cause (Opus says...)

The AMI architecture is hard-coded to "x86_64" in pkg/provider/aws/action/rhel-ai/constants.go:25 and used in all AMI lookups. Unlike aws rhel create, the aws rhel-ai create command does not expose an --arch flag.

Specifically:

  • constants.go:25 defines amiArch = "x86_64" as a package-level variable
  • rhelai.go lines 136, 140, 288-298 all use this hard-coded value for AMI filtering
  • cmd/mapt/cmd/aws/hosts/rhelai.go does not register a --arch flag (compare with rhel.go:77)
  • The RHELAIArgs.Arch field exists but is never populated from CLI flags, and its value is stored in rhelAIRequest.arch but never used

Expected Behavior

aws rhel-ai create should select the correct AMI based on the VM type it selects, or support an --arch flag, and use it when filtering AMIs/selecting instance types.

Dominant language
Go
Stars
26
Forks
41
Avg merge
3d 14h
Merged PRs (30d)
27

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from redhat-developer/mapt

All issues in redhat-developer/mapt

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.