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

AWS S3 Data Connector Scripts on MacOS - Cannot bind argument to parameter 'Message' because it is null. #11503

Open
mvisser-nhb opened this issue Nov 28, 2024 · 0 comments

Comments

@mvisser-nhb
Copy link

mvisser-nhb commented Nov 28, 2024

Describe the bug
I installed Powershell on MacOSX and downloaded the AWS S3 Data Connector Scripts, I am using AWS profiles with SSO connected to my entra ID so I have AWS cli configured with multiple profiles for multiple AWS accounts.

I get stuck with the script after filling in the role name and workspace id.

 .\ConfigAwsConnector.ps1


Starting ConfigAwsConnector at: 11/28/2024 11:12:40
  Log created: /Users/***/Downloads/AWS S3 Data Connector Scripts/ConfigAwsComToAzureCom/Logs/AwsS3-11281112.csv


To begin you will choose the AWS logs to configure.

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

Checking AWS CLI configuration...


This script creates an Assume Role with minimal permissions to grant Azure Sentinel access to your logs in a designated S3 bucket & SQS of your choice, enable CloudTrail Logs, S3 bucket, SQS Queue, and S3 notifications.

  Notes:
  * You can find more information about the script in https://github.com/Azure/Azure-Sentinel/blob/master/DataConnectors/AWS-S3/README.md
  * If a resource name(like: S3, Sqs, Kms) already exists, the script will use the available one and not create a new resource


Checking existing OIDC provider
  OIDC provider already exists
  Approved client IDs: api://1462b192-***
  Client ID api://1462b192-***** is already approved


Assume role definition

Please enter role name. If you have already configured an assume role for Azure Sentinel, use the same role name: ****
  Using role name: OIDC_*** with OIDC prefix because OpenID Connect authentication is being used.

You must specify the the Azure Sentinel Workspace ID. This is found in the Azure Sentinel portal.

Please enter your Azure Sentinel External ID (Workspace ID): ****
  Using Azure Sentinel Workspace ID: ***
Write-Log: /Users/***/Downloads/AWS S3 Data Connector Scripts/ConfigAwsComToAzureCom/Utils/HelperFunctions.ps1:74
Line |
  74 |                  Write-Log -Message $error[0] -LogFileName $LogFileNam …
     |                                     ~~~~~~~~~
     | Cannot bind argument to parameter 'Message' because it is null.
Retrying...

Please enter role name. If you have already configured an assume role for Azure Sentinel, use the same role name:

stripped my data from the logs, replaced by stars

To Reproduce

Expected behavior
The script should create the data connector resources in my selected profile

Screenshots
Image

Image

Desktop (please complete the following information):

  • OS: 15.1.1 (24B91)
  • PowerShell 7.4.6

Additional context
also tried within pwsh interactive shell

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

No branches or pull requests

1 participant