cool-glass-63014
02/21/2022, 12:28 PMaws:ecs:Service (backend):
error: unable to discover AWS AccessKeyID and/or SecretAccessKey - see <https://pulumi.io/install/aws.html> for details on configuration
even though I have several profiles, and for the stack I have the proper AWS profile configured in the yaml file. And it seems like it can build and push the docker image but it cannot edit the Fargate task definition or something? I am not savvy with either AWS or Pulumi and this is something I've inherited, but I can't wrap my head around this. I also followed the linked and repeated the setup and yet nothing.
EDIT: I can't seem to restore the state of whatever it is I've managed to bork up at all? I haven't changed any credentials or keys to begin with so this feels like such a weird curve ball? 🤔 Any ideas?little-cartoon-10569
02/21/2022, 8:09 PMAWS_PROFILE
or `AWS_ACCESS_KEY_ID`/`AWS_SECRET_ACCESS_KEY` in your environment to configure the backend.cool-glass-63014
02/22/2022, 12:48 PMaws:profile
didn't work anymore so I eventually set AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
instead. But this will make managing envs more problematicaws-native:profile
now, or something? Is this related to the problem?little-cartoon-10569
02/22/2022, 8:20 PMcool-glass-63014
02/24/2022, 9:11 AM~/.aws/credentials
, so the GitHub Action also works without the env variables. So I'm confused as to what you mean with "aws:profile won't ever work with backends". 🤔
If I've declared something weird in my rewrite of the stack that causes this I'd like to identify it. Other than that the config should be the same regarding AWS itself.little-cartoon-10569
02/24/2022, 9:08 PMcool-glass-63014
02/25/2022, 8:40 AMaws:ecs:Service (backend):
refers to our service called backend
in pulumi, and part of what I'm up to right now is implementing a naming convention for all Pulumi resources so as to not be able to confuse them between envs, if one were to accidentally run this with incorrect AWS credentials. backend
used to be the name for our ECS Cluster, Fargate Service, Docker Image and much more. Now it's going to follow <service>-<env>-<aws-resource-type>
instead.Pulumi-<stack>.yml
files. Or using aws configure
, which is a different CLI altogether, or the env variables as mentioned earlier.little-cartoon-10569
02/27/2022, 9:15 PMaws:profile
was set correctly, but they were working when AWS_PROFILE
was set correctly. It turns out that aws:profile
isn't used by default when you're creating your own AWS provider. Are you doing that? If you are, then can you try setting profile: new pulumi.Config("aws").require("profile")
?cool-glass-63014
03/07/2022, 2:04 PM