Cannot perform an interactive login from a non TTY device

0 votes
Oct 10, 2024 in AWS by Priyanka
• 4,500 points
186 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

If you see the error 'Cannot perform an interactive login from a non-TTY device', it means you're trying to log in interactively in an environment that doesn’t have access to a terminal (like a script or automation).

Here’s how to fix it:

  1. Use Non-Interactive Methods:

Instead of aws sso login, configure AWS credentials using:

    aws configure

  1. This way, you avoid needing an interactive login.

  2. Force a TTY:

If using ssh, add the -t flag:
    ssh -t user@hostname

  1. Running in Docker:

Run the container with:
    docker run -it <container-name>

  1. The -it flag makes the container interactive.

  2. For CI/CD Pipelines: Use environment variables for credentials, since CI systems don’t support interactive logins.

  3. Avoid Interaction: Pre-configure logins and avoid prompts where possible to work smoothly in non-TTY environments.

answered Oct 14, 2024 by anonymous

edited Mar 6

Related Questions In AWS

0 votes
1 answer

"Cannot perform an interactive login from a non TTY device"

I also got the error 'Cannot perform ...READ MORE

answered Oct 24, 2024 in AWS by Tanushree
533 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Create an S3 bucket in a specific region from the command line.

Hi@akhtar, You can use LocationConstraint in your command. ...READ MORE

answered Oct 7, 2020 in AWS by MD
• 95,460 points
2,872 views
+2 votes
2 answers

How do we move a domain from Hostgator to AWS Route 53?

I found this  Before transferring a domain, make ...READ MORE

answered Aug 3, 2018 in AWS by Priyaj
• 58,020 points
6,236 views
0 votes
1 answer

Want to use an AWS Cognito User Pool without putting a password(for an easier approach)

Currently, AWS Cognito is not supporting passwordless ...READ MORE

answered May 4, 2018 in AWS by Cloud gunner
• 4,670 points
5,630 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP