aws-amplify / aws-amplify/amplify-cli

prompt for AWS session token and re-prompt when it expires

Open
#11,749 4 comments 0 reactions 0 assignees View on GitHub
feature-request p4 pending-review platform-config
Dominant language
TypeScript
Stars
2.9k
Forks
825
Avg merge
11d 23h
Merged PRs (30d)
2

Description

### How did you install the Amplify CLI?

yarn

### If applicable, what version of Node.js are you using?

v16.14.0

### Amplify CLI Version

10.6.1

### What operating system are you using?

windows 11

### Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

no

### Describe the bug

When using `AWS access keys` authentication the token expires without asking to re authenticate.

### Expected behavior

amplify should ask to re authenticate if the token is expired.

### Reproduction steps

1. copy aws account credentials from `XXXX.awsapps.com/start#/` and paste into terminal
2. run `amplify init` choose `AWS access keys` for authentication
3. git commit & delete repository
4. clone repository
5. paste credentials into terminal
6. run `amplify pull --appId XXXXX --envName dev` use `AWS access keys` for authentication
7. wait until the AWS session token expires (not sure how long that takes)
8. run `amplify pull`

### Project Identifier

_No response_

### Log output

```
# Put your logs below this line

```

### Additional information

_No response_

### Before submitting, please confirm:

- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
- [X] I have removed any sensitive information from my code snippets and submission.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the credential flow used by `amplify init` and `amplify pull` with `AWS access keys`, then reproduce the behavior after the AWS session token expires. Done means the CLI detects the expired token, prompts for authentication again, and allows the requested operation to continue.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.