I’ve tried reading up on how this is meant to work but the docs aren’t in sync with what I am seeing.
I have some Powershell code that runs a couple of AWS CLI commands (around elbv2 and target groups)
I have created a Step Template based on the AWS CLI Script step to run a command.
It feels like the right thing to do as we don’t need to be on a specific target at this point. Just run these commands in our AWS account.
I want to use as vanilla a solution as possible, so am trying to use the built in AWS CLI environment in the default Windows worker.
First issue is the step errors with:
System.Exception: AWS-LOGIN-ERROR-0003: Failed to access the role information under http://169.254.169.254/latest/meta-data/iam/security-credentials/, or failed to parse the response. This may be because the instance does not have a role assigned to it
Obv I’ve clicked the link but that doesn’t really help.
I have tried running the step using a role, but then running it using an AWS Account variable.
Unfortunately here the UI is different from the docs and doesn’t show the account drop down. It just lets me add a variable in as a string.
I’ve also done this (as there should be a variable called #{AWSAccount} available to it in the deploy) but this still errors with the same error above.
Why is the worker instance trying to call for the role metadata? Surely it shouldn’t need to if I have given it the correct AWS Account credentials?
Why would this even work like this anyway? I want to run on a worker so getting the metadata wouldn’t make sense would it?
Like I say I thought I understood this but this doesn’t seem right at all so I have probably missed something fundamental.
My requirements seem pretty simple and well-suited to this worker but I just don’t know how to get it working.
Any help?