serverless / compose

Orchestrate Serverless Framework in monorepos
https://serverless.com/framework/docs/guides/compose
MIT License
110 stars 15 forks source link

Unable to set AWS profile correctly #158

Open muddahany opened 1 year ago

muddahany commented 1 year ago

I am having a difficulty setting AWS profile with serverless-compse

We have a Makefile that basically loads up the AWS credentials inside a profile and then use it to deploy. The following approaches were taken when running the CD:

Originally posted by @muddahany in https://github.com/serverless/compose/issues/120#issuecomment-1240889932

timdev commented 1 year ago

Setting env var with AWS_PROFILE= also does not work and serverless assumes the default profile.

Did you try with AWS_SDK_LOAD_CONFIG=1 in your environment along with AWS_PROFILE?

jprice-da15252 commented 7 months ago

~I have the same issue and a similar setup as described above.~ My issue was due to the proflle not resolving properly in the serverless.yml file, and the default value for an unset environment variable being default:

        profile: ${opt:aws-profile, env:aws-profile, 'default'}
muddahany commented 6 months ago

I was statically setting a value for it. Anyway we have moved away from this and decided to stick with pnpm and handle shared infrastructure in terraform and export the needed resources ARNs to serverless env.