Unable to change queue inside config

I created a CI stack with json to set up the pipeline using BuildKite. My instance was on Debian AMI. However, I made a mistake. I passed a wrong value for BuildKiteQueue. Previous version was

{ "ParameterKey": "BuildKiteQueue", "ParameterValue": "kazys" },

What I want is

{ "ParameterKey": "BuildKiteQueue", "ParameterValue": "royce" },

I logged into the instance and ran these two commands to receive the log

sudo systemctl enable buildkite-agent && sudo systemctl start buildkite-agent
sudo journalctl -f -u buildkite-agent

and I got this
Successfully registered agent “ip-172-31-9-207-1” with tags [queue=kazys, arch=x86_64, distro=debian, hostname=ip-172-31-9-207.us-west-2.compute.internal]

Basically, I just wanted to change queue=royce rather than kazys. So I followed this tutorial to set up buildkite agent: Buildkite Agent Configuration v3 | Buildkite Documentation, and changed the tags value in the config. This is what my config looked like after the change:

sudo cat /etc/buildkite-agent/buildkite-agent.cfg

# If set and valid, the given tracing backend will be enabled. Eg: datadog
# tracing-backend=""
tags=queue=royce,arch=x86_64,distro=debian,hostname=ip-172-31-9-207.us-west-2.compute.internal

Then I ran this two commands again

sudo systemctl enable buildkite-agent && sudo systemctl start buildkite-agent
sudo journalctl -f -u buildkite-agent

Nothing changed at all.
[queue=kazys, arch=x86_64, distro=debian, hostname=ip-172-31-9-207.us-west-2.compute.internal]

So after I added change into config, how do I tell the buildkite agent to start with this new config?

Hi @roycez,

The default AMI that we ship with the Elastic Stack for AWS is based on Amazon Linux 2. Have you created a custom AMI and specified that in the ImageID stack parameter?

Typically we consider the instances in an elastic stack to be ephemeral, and the on-disk config is rarely updated manually. The change the queue, we recommend updating the Cloud Formation stack with a new value in the “BuildkiteQueue” stack parameter, and new instances will be created using that queue.

That should work well with the standard Amazon Linux 2 based AMI, but I’m not sure what will happen with a c customised Debian image.

Thank you @jhealy. I created the AMI with specified Debian Image ID. I removed the old instances and created a new one with updated “BuildKiteQueue” value, and it works now.