boto / boto3

AWS SDK for Python
https://aws.amazon.com/sdk-for-python/
Apache License 2.0
9.04k stars 1.87k forks source link

Unable to Put Logging Configuration for WAF #1815

Closed niraj8241 closed 5 years ago

niraj8241 commented 5 years ago

I am trying to put logging configuration using boto3 waf-regional and i am unable to get it to work. I seem to be passing the right argument but that doesn't work at all. Can you please guide me if i am mistaken:

My Code: def put_logging_configuration(self): response = self.waf-regional.put_logging_configuration( LoggingConfiguration={ 'ResourceArn': 'arn:aws:waf-regional:us-east-1:account-id:webacl/0381d5e2-dd0b-4f9b-a81d-f8e83237078f', 'LogDestinationConfigs': [ 'arn:aws:firehose:us-east-1:account-id:deliverystream/aws-waf-logs-niraj' ] } ) print(response)

Error:

botocore.exceptions.ClientError: An error occurred (ValidationException) when calling the GetLoggingConfiguration operation: 0381d5e2-dd0b-4f9b-a81d-f8e83237078f is not a valid arn for WAF resources.

I am following the ARN documentation at https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html according to which the ARN seems to be correct.

Also, I feel the get_web_acl() should return this ARN when called.

Thanks in advance.

niraj8241 commented 5 years ago

I think i found the issue. The get_web_acl() works.