Skip to content

Script in bottlerocket user-data #1343

Answered by bcressey
ghost asked this question in Q&A
Discussion options

You must be logged in to vote

Today there's no way to do exactly what you're asking for, outside of a custom build.

We do have the ability to populate settings based on a template at runtime; that's how host containers are configured to pull from the regional ECR repository. However, there's not currently a way to define new templates or override them via user-data.

We're also in the early stages of designing a "bootstrap container" interface that would let you run a script inside a container during first boot, so you could do something like this:

INSTANCE_TYPE="$(curl -s http://169.254.169.254/latest/meta-data/instance-type)"
AZ="$(curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone)"
apiclien…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@bcressey
Comment options

Answer selected by gregdek
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant