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

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

Closed
ezaspy opened this issue Aug 4, 2023 · 11 comments
Closed

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

ezaspy opened this issue Aug 4, 2023 · 11 comments
Assignees
Labels
Connector Connector specialty review needed

Comments

@ezaspy
Copy link

ezaspy commented Aug 4, 2023

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 #8293 (comment)

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2023

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
Copy link
Contributor

github-actions bot commented Aug 6, 2023

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.

1 similar comment
@github-actions
Copy link
Contributor

github-actions bot commented Aug 6, 2023

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-amolpatil v-amolpatil added the Connector Connector specialty review needed label Aug 6, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 6, 2023

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
Copy link
Contributor

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

@v-sudkharat
Copy link
Contributor

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
Copy link
Author

ezaspy commented Aug 11, 2023

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Connector Connector specialty review needed
Projects
None yet
Development

No branches or pull requests

4 participants