Describe the bug
Hey man! I gave stage1 a shot today and I think I found a process issue that organizations are going to hit. I am unable to gain permissions to run the gewalthaufen.py script because I cannot run it as an AWS profile different than the default. can you add a flag to the script to specify the aws cli profile I want to run the script as?
To Reproduce
Steps to reproduce the behavior:
- git clone project
- run code
cd - python3 gewalthaufen.py \ my-aws-region (us-east-1) \ vpc-id (vpc-123456) \ waf-arn (from CFN e.g. arn:aws:wafv2:us-east-1:12345678:regional/webacl/SyntheticSun-WACL/waf-id-goes-here) \ firehose-arn (from CFN e.g. arn:aws:firehose:us-east-1:12345678:deliverystream/aws-waf-logs-syntheticsun) \ elasticsearch-endpoint (e.g. https://my-domain-elasticsearch.com) \ misp-instance-id (i-123456789012)
Expected behavior
should be able to run with --profile blah
flag
Screenshots
n/a
Logs
An error occurred (UnauthorizedOperation) when calling the DescribeRouteTables operation: You are not authorized to perform this operation. Traceback (most recent call last): File "gewalthaufen.py", line 390, in <module> im_helping() File "gewalthaufen.py", line 381, in im_helping endpoint_attachment() File "gewalthaufen.py", line 40, in endpoint_attachment response = ec2.describe_route_tables(Filters=[{'Name': 'vpc-id','Values': [vpcId]}],DryRun=False) File "/usr/local/lib/python3.7/site-packages/botocore/client.py", line 276, in _api_call return self._make_api_call(operation_name, kwargs) File "/usr/local/lib/python3.7/site-packages/botocore/client.py", line 586, in _make_api_call raise error_class(parsed_response, operation_name) botocore.exceptions.ClientError: An error occurred (UnauthorizedOperation) when calling the DescribeRouteTables operation: You are not authorized to perform this operation.
Additional context
n/a