aws-samples / aws-samples/aws-device-lobby

amplify init does not work with SSO or short-terms credentials

Open
#8 0 comments 0 reactions 0 assignees View on GitHub
bug good first issue
Dominant language
JavaScript
Stars
22
Forks
5
PR merge metrics
No merged PRs in 30d

Description

Environment:
Ubuntu 22.04

Command:
amplify init

Expected result:
amplify is initialized

Actual result:
Initialization failed with error:
```
amplify init
Note: It is recommended to run this command from the root of your app directory
? Enter a name for the project DLAdminConsole
The following configuration will be applied:

Project information
| Name: DLAdminConsole
| Environment: dev
| Default editor: Visual Studio Code
| App type: javascript
| Javascript framework: react
| Source Directory Path: src
| Distribution Directory Path: build
| Build Command: npm run-script build
| Start Command: npm run-script start

? Initialize the project with the above configuration? Yes
Using default provider awscloudformation
? Select the authentication method you want to use: AWS profile

For more information on AWS Profiles, see:
https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html

? Please choose the profile you want to use dev-admin
🛑 Failed to get profile credentials
Cannot read properties of undefined (reading 'accessKeyId')

```

Case with AWS access keys does not ask for AWS_SESSION_TOKEN and failed with only AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY

Contributor guide

Open the contributing guide

Research direction

Start by reproducing `amplify init` on Ubuntu 22.04 with an AWS SSO/profile setup and with AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_SESSION_TOKEN. Trace the credential handling reached by the `amplify init` command; done means initialization succeeds for SSO and short-term credentials without the undefined accessKeyId error.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.