Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add admin args option #114

Merged
merged 2 commits into from May 9, 2018
Merged

Add admin args option #114

merged 2 commits into from May 9, 2018

Conversation

@kevinegami
Copy link
Contributor

@kevinegami kevinegami commented May 8, 2018

AWS CLI .aws/credentials can have more than one user. Previously, the script would default to the last set of access/secret keys, which may not have administrative privileges. If the user does have multiple users, this will allow them to pass in the admin name with administrative permissions.

Note: This is different than "user" which will have access to the s3 bucket and not necessarily have admin privileges.

@Shwetajain148 can you please review. Can you email Pankaj to test as well after approval/merge.

Thank you

@Shwetajain148
Copy link
Contributor

@Shwetajain148 Shwetajain148 commented May 9, 2018

Thanks @kevinegami !

Code changes look good to me.

I have tried to run the updated script on my machine(windows 10). I am getting an exception below

Traceback (most recent call last):                                                                                                                                                                                                
  File "SQS3script.py", line 59, in <module>                                                                                                                                                                                        
    with open(os.environ['HOME'] + '/.aws/credentials') as f:                                                                                                                                                                     
  File "C:\Python27\lib\os.py", line 425, in __getitem__                                                                                                                                                                            
    return self.data[key.upper()]                                                                                                                                                                                               
KeyError: 'HOME' 

I am also getting same exception with the script which is already in production. It seems like machine environment issue. I will give another try on linux(ubuntu) machine tomorrow and will update you.

@kevinegami kevinegami merged commit f1fe1b2 into loggly:master May 9, 2018
@kevinegami
Copy link
Contributor Author

@kevinegami kevinegami commented May 9, 2018

The issue mentioned above was broken before this PR, due to the script assuming to be run in a unix environment. I have a PR fix here: #115

@musikaarqa
Copy link

@musikaarqa musikaarqa commented May 10, 2018

We have checked with updated script, link

https://raw.githubusercontent.com/kevinegami/install-script/2bdc921c939d854eb378a6ca47fb646f5e96df5d/AWSscripts/SQS3script.py

and successfully able to get the logs in QA Environment.

Please let us know if there are any test cases need to perform on this.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.