Junes786
Junes786

Reputation: 13

AWS Config - MaxNumberOfDeliveryChannelsExceededException

I need some advice, i want to create an exception which will ignore AWS Config Delivery channel, if already create. Currently i am getting the following error -

Failed to put delivery channel 'Security-DeliveryChannel-V156D0TVGUC6' because the maximum number of delivery channels: 1 is reached. (Service: AmazonConfig; Status Code: 400; Error Code: MaxNumberOfDeliveryChannelsExceededException;

I have written the following code and i need some assistance to write some exception, to ignore the following resource creation if AWS Config - Delivery Channel - already created

DeliveryChannel:
Type: 'AWS::Config::DeliveryChannel'
Properties:
ConfigSnapshotDeliveryProperties:
DeliveryFrequency: !Ref DeliveryFrequency
S3BucketName: !If [InternalBucket, !Ref AuditLogBucket, !Ref ExternalAuditLogBucket]
SnsTopicARN: !Ref AuditLogSNSTopic

Upvotes: 1

Views: 3087

Answers (1)

Adnã Oliveira
Adnã Oliveira

Reputation: 131

If you ever set up AWS Config via console you have to clean up using AWS CLI.

You can get the status of AWS Config

aws configservice get-status

And then clean up the recorder and the delivery channel

aws configservice delete-configuration-recorder --configuration-recorder-name default
aws configservice delete-delivery-channel --delivery-channel-name default

when you're done you should be able to create AWS config through CloudFormation

if you set it up on multiple regions use

aws --region us-east-2 configservice ....

Upvotes: 6

Related Questions