serverless / serverless/serverless

AWS profile "default" doesn't seem to be configured

Open
#9,271 11 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug cat/aws-auth
Dominant language
JavaScript
Stars
46.9k
Forks
5.7k
Avg merge
10h 7m
Merged PRs (30d)
57

Description

If we're deploying directly from an AWS instance which has a role with adequate permissions for the deploy already (without roleArn, accessKeyId or sessionToken Serverless raises the mentioned exception.

https://github.com/serverless/serverless/blob/341a886874eb8a6c671f576323e75a77cffa1fd2/lib/plugins/aws/provider.js#L127-L139

Our ~/.aws/config file just looks like this and is adequate to access all the resources required:

[default]
region = ap-southeast-2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in lib/plugins/aws/provider.js at lines 127-139 and reproduce the reported case from an AWS instance with an attached role and only a region in ~/.aws/config. Check how the provider handles missing roleArn, accessKeyId, and sessionToken; done means deployment proceeds using the instance role without raising the default-profile exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, javascript
Domain
authentication, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.