Giter Club home page Giter Club logo

awscli_bastion's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

awscli_bastion's Issues

Check for cache directory exists before write

  • awscli_bastion version: 0.8.3
  • Python version: 3.6.9
  • Operating System: Ubuntu 18.04

Description

Just installed and configured, when first login, the command fails:

Enter MFA code for arn:aws:iam::xxx:mfa/xx:

Error when retrieving credentials from custom-process: Traceback (most recent call last):
  File "/home/okelet/.local/bin/bastion", line 11, in <module>
    sys.exit(main())
  File "/home/okelet/.local/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/okelet/.local/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/okelet/.local/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/okelet/.local/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/okelet/.local/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/okelet/.local/lib/python3.6/site-packages/awscli_bastion/cli.py", line 43, in get_session_token
    sts_creds = sts.get_session_token(mfa_code=mfa_code, mfa_serial=mfa_serial, duration_seconds=duration_seconds)
  File "/home/okelet/.local/lib/python3.6/site-packages/awscli_bastion/sts.py", line 85, in get_session_token
    self.cache.write(sts_creds)
  File "/home/okelet/.local/lib/python3.6/site-packages/awscli_bastion/cache.py", line 72, in write
    with open(self.bastion_sts_cache_path, 'w+') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/okelet/.aws/cli/cache/bastion-sts.json'

What I Did

aws sts get-caller-identity --profile xxx

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.