Skip to content

copilot env init should fall back to "default" profile in absence of AWS profiles #5066

@Lou1415926

Description

@Lou1415926

When running copilot env init, Copilot will:

  1. Read the AWS profiles from the machine (usually, this is a file in the ~/.aws/credentials path);
  2. Prompt the user to select a profile with which the environment should be created with.

Today, if Copilot fails to read the profiles in step 1, it simply errorr out. This requires users to: 1. Either configure a profile, OR 2. use temporary credentials

For a user that is not familiar with AWS, this is confusing; for a toned AWS user that doesn't use shared profiles, this is not convenient.

My proposal is that Copilot should read the AWS profiles from the machine (usually, this is a file in the ~/.aws/credentials path), then:

  1. If the profile is not configured (i.e. the profile file - usually ~/.aws/credentials - is absent), then Copilot defaults to whatever aws sts get-caller-identity returns. In this case, the env session would use
    func (p *Provider) Default() (*session.Session, error) {
  2. If it fails to read the profiles for other reasons, error out
  3. If it is able to read the profile, prompt.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/UIIssues about UIarea/envIssues about environments.good first issueIssues for newcomers.size/SWe should be able to deliver roughly 2 small issues in a sprint.type/enhancementIssues that are improvements for existing features.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions