Giter Club home page Giter Club logo

Comments (8)

TheScottMo avatar TheScottMo commented on August 11, 2024 2

Hello, thank you for adding this information. I think I have found the cause of this error. I am working towards a fix, in the interim if you set your environmental variables to use the active profile and dont use the --profile flag, that should work until I can get this fix pushed.

from ec2-classic-resource-finder.

TheScottMo avatar TheScottMo commented on August 11, 2024 2

Turns out a few extra tabs in the wrong places make a whole world of difference. I have pushed a fix which should resolve this issue. (NOTE: this bug also affected organizational runs as well, although they saw a much less verbose error)

from ec2-classic-resource-finder.

TheScottMo avatar TheScottMo commented on August 11, 2024

Is this only happening when you're using a profile or does it occur with other authentication methods? also, do you only and always get this error under Data Pipelines, or does it happen under other services at all?

from ec2-classic-resource-finder.

echoboomer avatar echoboomer commented on August 11, 2024

Profile is the only method I've tried so far, I haven't tried with role assumption. It always happens right at the end under data pipelines, so each time I run the script the output is just like that.

from ec2-classic-resource-finder.

TheScottMo avatar TheScottMo commented on August 11, 2024

Ok, thank you. Let me do some testing in my environment and see if I can replicate this.

from ec2-classic-resource-finder.

sqlbot avatar sqlbot commented on August 11, 2024

fwiw, I'm experiencing essentially the same reported behavior (with python 3.3.8 on Ubuntu 20.04.3 on WSL2 on Windows 10 21H1 build 19043.1348) when I use --profile...

$ python3 py-Classic-Resource-Finder.py --profile myprofile
Checking the Classic platform status in us-east-1
Checking for EIPs in us-east-1
Checking for Classic EC2 Instances in us-east-1
-- snip --
Checking for Classic Data Pipelines in us-east-1
Traceback (most recent call last):
  File "../py-Classic-Resource-Finder.py", line 847, in <module>
    main(argparser(sys.argv[1:]))
  File "../py-Classic-Resource-Finder.py", line 841, in main
    loopregions(classicregions, datapipelineregions, creddict)
  File "../py-Classic-Resource-Finder.py", line 668, in loopregions
    process.start()
  File "/usr/lib/python3.8/multiprocessing/process.py", line 115, in start
    assert self._popen is None, 'cannot start a process twice'
AssertionError: cannot start a process twice

...however, the code seems to work correctly when the same profile is active via environment variable.

$ env AWS_PROFILE=myprofile python3 py-Classic-Resource-Finder.py
-- snip --
Checking for Classic OpsWorks stacks in ap-southeast-2
Checking for Classic OpsWorks stacks in ap-southeast-1
Checking for Classic Data Pipelines in ap-southeast-2
finished

Out of curiosity, I tried specifying the same profile in both places.

$ env AWS_PROFILE=myprofile python3 py-Classic-Resource-Finder.py --profile myprofile

...but this also fails, with the same error that occurs when using --profile alone.

In my environment, I don't use a [default] section in ~/.aws/config (to avoid inadvertently/implicitly using a set of credentials or region) but adding that section with a valid key and secret also did not seem to make any difference -- the code still fails with the same error when using --profile.

from ec2-classic-resource-finder.

echoboomer avatar echoboomer commented on August 11, 2024

Can confirm using the environment variable to set profile works. Thanks!

from ec2-classic-resource-finder.

nngabriel avatar nngabriel commented on August 11, 2024

Can confirm using the environment variable to set profile works. Thanks!

I was having the same issue.
But setting the environment variable to the right profile did the trick.
Of course without using the -p option.
Thanks Scott

from ec2-classic-resource-finder.

Related Issues (19)

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.