Azure / Azure-Sentinel

Cloud-native SIEM for intelligent security analytics for your entire enterprise.
https://azure.microsoft.com/en-us/services/azure-sentinel/
MIT License
4.57k stars 3k forks source link

Cannot bind argument to parameter 'Message' because it is null. #8717

Closed ezaspy closed 1 year ago

ezaspy commented 1 year ago

Describe the bug I am experiencing the following error. I follow the steps from https://learn.microsoft.com/en-us/azure/sentinel/connect-aws?tabs=s3#instructions under Automatic Setup and upon running of ./ConfigAwsConnector.ps1 an error returns:

Checking AWS CLI configuration...
Cannot bind argument to parameter 'Message' because it is null.
Please execute again 'aws configure' and verify that AWS configuration is correct.
For more details please see AWS doc https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html

Content of Log below:

"Time","Message","Severity"
"26/07/2023 14:19","Starting ConfigAwsConnector at: 07/26/2023 14:19:53","Information"
"26/07/2023 14:19","Log created: /home/user/Azure-Sentinel/Logs/AwsS3-07261419.csv","Information"
"26/07/2023 14:19","To begin you will choose the AWS logs to configure.","Information"
"26/07/2023 14:20","Checking AWS CLI configuration...","Information"
"26/07/2023 14:20","Cannot bind argument to parameter 'Message' because it is null.","Error"
"26/07/2023 14:20","Please execute again 'aws configure' and verify that AWS configuration is correct.","Error"
"26/07/2023 14:20","For more details please see AWS doc https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html","Error

To Reproduce Follow the instructions as presented here: https://github.com/Azure/Azure-Sentinel/tree/master/DataConnectors/AWS-S3 See error as shown above.

Expected behavior If following the instructions, no error should be shown during the execution of the aforementioned PowerShell script.

Screenshots N/A

Desktop OS: Linux Ubuntu 22.04 Latest version of PowerShell and the AWS cli.

Originally posted by @ezaspy in https://github.com/Azure/Azure-Sentinel/issues/8293#issuecomment-1651817666

github-actions[bot] commented 1 year ago

Thank you for submitting an Issue to the Azure Sentinel GitHub repo! You should expect an initial response to your Issue from the team within 5 business days. Note that this response may be delayed during holiday periods. For urgent, production-affecting issues please raise a support ticket via the Azure Portal.

github-actions[bot] commented 1 year ago

Thank you for submitting an Issue to the Azure Sentinel GitHub repo! You should expect an initial response to your Issue from the team within 5 business days. Note that this response may be delayed during holiday periods. For urgent, production-affecting issues please raise a support ticket via the Azure Portal.

github-actions[bot] commented 1 year ago

Thank you for submitting an Issue to the Azure Sentinel GitHub repo! You should expect an initial response to your Issue from the team within 5 business days. Note that this response may be delayed during holiday periods. For urgent, production-affecting issues please raise a support ticket via the Azure Portal.

github-actions[bot] commented 1 year ago

Thank you for submitting an Issue to the Azure Sentinel GitHub repo! You should expect an initial response to your Issue from the team within 5 business days. Note that this response may be delayed during holiday periods. For urgent, production-affecting issues please raise a support ticket via the Azure Portal.

v-sudkharat commented 1 year ago

Hi @ezaspy, thanks for flagging this, we will soon get back to you on this. Thanks!

v-sudkharat commented 1 year ago

Hi @ezaspy, as per above shared screenshot, you need to configure "AWS CLI" in the system. Please refer below steps to configuration "AWS CLI " and its path in Windows O.S Step 1: - Please download files from "Script prerequisites" section from link: -https://github.com/Azure/Azure-Sentinel/blob/master/DataConnectors/AWS-S3/README.md

step 2: - Run PowerShell in admin mode and execute below command. Refer this document for more details - https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html msiexec.exe /i https://awscli.amazonaws.com/AWSCLIV2.msi

step 3:- Run the "./ConfigAwsConnector.ps1" script from downloaded and extracted zip.

Sharing the screenshot of successfully running "./ConfigAwsConnector.ps1" script: - Screenshot 2023-08-09 164455

Let us know if above step's are working for you. Thanks!

ezaspy commented 1 year ago

Hi @v-sudkharat I have the aws cli installed have run aws configure and authenticated successfully. I then run the .\ConfigAwsConnector.ps1 command and get the same error - shown below:

To begin you will choose the AWS logs to configure.

Please enter the AWS log type to configure (VPC, CloudTrail, GuardDuty, CustomLog): VPC

Checking AWS CLI configuration...
Write-Log: /home/user/Azure-Sentinel/Utils/HelperFunctions.ps1:15
Line |
  15 |          Write-Log -Message $error[0] -LogFileName $LogFileName -Sever …
     |                             ~~~~~~~~~
     | Cannot bind argument to parameter 'Message' because it is null.
Please execute again 'aws configure' and verify that AWS configuration is correct.
For more details please see AWS doc https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html

Press any key to continue...
v-sudkharat commented 1 year ago

Hi @ezaspy, We checked the error message shown above. Please refer to the instructions and link below for the resolution, which we have shared with screenshots and documents. Please check once below data connector prerequisite (Workspace: write permission and Environment). image

If all prerequisite is already meet, move to "aws configure" command from your PowerShell command line, enter relevant information as prompted and reverify before procced.

AWS Access Key ID :  Your Key ID
AWS Secret Access Key: Your Secret Access Key 
Default region name: Example - us-west-2
Default output format:  Example - json

Sharing screenshot for reference: image For more details about "aws configure" field follow this document: - https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html After "aws configure" is done successfully, run.\ConfigAwsConnector.ps1 script. Please let us know if facing same issue. Thanks!

v-sudkharat commented 1 year ago

Hi @ezaspy, Gentle Reminder: We are waiting for your response on this issue. If you still need to keep this issue active, please respond on it in the next 2 days. If we don't receive response by 23-08-2023 date, we will be close this issue. Thanks!

v-sudkharat commented 1 year ago

Hi @ezaspy, since we have not received a response in the last 5 days, we are closing your issue as per our standard operating procedures. If you still need support for this issue, feel free to re-open at any time. Thank you for your co-operation.

github-actions[bot] commented 1 year ago

Thank you for submitting an Issue to the Azure Sentinel GitHub repo! You should expect an initial response to your Issue from the team within 5 business days. Note that this response may be delayed during holiday periods. For urgent, production-affecting issues please raise a support ticket via the Azure Portal.