awslabs / aws-config-rdk

The AWS Config Rules Development Kit helps developers set up, author and test custom Config rules. It contains scripts to enable AWS Config, create a Config rule and test it with sample ConfigurationItems.
https://aws-config-rdk.readthedocs.io
Apache License 2.0
461 stars 172 forks source link

rdk init fails when AWS Config is configured to use a bucket from another account #123

Closed StefanKrecher closed 4 years ago

StefanKrecher commented 6 years ago

rdk init seems to fail, when delivery_channels['DeliveryChannels'][0]['s3BucketName'] returns the name of a central bucket from another account. The init-process isn't aware that the bucket already exists (maybe it is enough to set "config_bucket_exists = True" at around line 118/119). Anyway: the call "response = my_s3.list_buckets()" will not return the name of the bucket (because the bucket is in another account). The then following create_bucket account will fail, because the bucket-name isn't available

Originally posted by @StefanKrecher in https://github.com/awslabs/aws-config-rdk/issues/46#issuecomment-436213321

StefanKrecher commented 6 years ago

This is a bug. Adding: config_bucket_exists = True after line 118 solved the problem for me

vikas027 commented 5 years ago

Hey @StefanKrecher ,

Where have you specified the line config_bucket_exists = True?

bkrodgers commented 5 years ago

Any updates on this? It looks like you can work around this for the most part if you manually create the bucket it wants you to use for deploying the rules, but the failed rdk init appears to mean that bucket isn't created in the init process.

(FWIW, ran into this in a workshop at re:Inforce)

darrent commented 5 years ago

Hi, would it be fair to say that the only way to currently run the init command is to pull the rdk source code, configure config_bucket_exists = True, build and use?

jack1902 commented 5 years ago

@darrent if you want to run the init but essentially skip bucket creation you can pull down my PR to skip checking the bucket but still get all the other checks done

0xjjoyy commented 4 years ago

Hi, any updates on this issue?