Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS_CONFIG_FILE is not used #11443

Closed
4 tasks done
mentos1386 opened this issue Oct 14, 2022 · 2 comments
Closed
4 tasks done

AWS_CONFIG_FILE is not used #11443

mentos1386 opened this issue Oct 14, 2022 · 2 comments

Comments

@mentos1386
Copy link

mentos1386 commented Oct 14, 2022

Are you certain it's a bug?

  • Yes, it looks like a bug

Is the issue caused by a plugin?

  • It is not a plugin issue

Are you using the latest v3 release?

  • Yes, I'm using the latest v3 release

Is there an existing issue for this?

  • I have searched existing issues, it hasn't been reported yet

Issue description

I'm trying to use AWS_CONFIG_FILE env variable to use custom path for aws config file. Aws cli works, but serverless is complaining that my profile "doesn't seem to be configured".

It seem to be reported in but ignored:

Running aws sts get-caller-identity works fine.

The environment variables set are. Some are present, but empty (which shouldn't cause any issues).

$ env  | grep AWS
AWS_PROFILE=<redacted>
AWS_REGION=us-east-1
AWS_DEFAULT_PROFILE=<redacted>
AWS_SECRET_ACCESS_KEY=
AWS_CONFIG_FILE=/home/<redacted>/projects/<redacted>/.workspace/runtime/config/aws-config
AWS_ACCESS_KEY_ID=

Service configuration (serverless.yml) content

service: device-manager

provider:
  name: aws
  runtime: nodejs16.x

functions:
  guard:
    handler: dist/apps/guard/main.js

Command name and used flags

npx serverless invoke --verbose --function guard

Command output

Environment: linux, node 16.16.0, framework 3.23.0 (local), plugin 6.2.2, SDK 4.3.2
Docs:        docs.serverless.com
Support:     forum.serverless.com
Bugs:        github.com/serverless/serverless/issues

Error:
AWS profile "<redacted>" doesn't seem to be configured

Environment information

Running "serverless" from node_modules
Framework Core: 3.23.0 (local) 3.23.0 (global)
Plugin: 6.2.2
SDK: 4.3.2
@mentos1386
Copy link
Author

mentos1386 commented Oct 14, 2022

Another relevant issue #9290 which might address this.

@medikoo
Copy link
Contributor

medikoo commented Oct 14, 2022

@mentos1386 let's group all the AWS credential resolution reports at #9290

I'm going to close it as duplicate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants