GithubHelp home page GithubHelp logo

Comments (3)

michaelborchert avatar michaelborchert commented on May 19, 2024

Can you post the exact rdk commands you used, and your rule config json if possible?

from aws-config-rdk.

jongogogo avatar jongogogo commented on May 19, 2024

Recreated the error in another account

C:\Users\jrault\AppData\Local\Programs\Python\Python36\Scripts>python rdk init
Running init!
Found Config Recorder: Application-Account-Compliance-as-Code-ConfigurationRecorder-XXXXXXXXX6YTYG
Found Config Role: arn:aws:iam::XXXXXXXXX4688:role/service-role/AWSConfigRole-DO-NOT-DELETE
Found Bucket: centralized-config-XXXXXXXXX6564
Config Service is ON
Config setup complete.
Creating Code bucket config-rule-code-bucket-XXXXXXXXX4688eu-west-1

C:\Users\jrault\AppData\Local\Programs\Python\Python36\Scripts>python rdk create dummyrule --runtime python3.6 --resource-types AWS::EC2:Instances
Running create!
Local Rule files created.

Directory of C:\Users\jrault\AppData\Local\Programs\Python\Python36\Scripts\dummyrule

01/28/2018 03:48 PM

.
01/28/2018 03:48 PM ..
01/28/2018 03:47 PM 814 dummyrule.py
01/28/2018 03:48 PM 241 parameters.json
01/28/2018 03:47 PM 5,595 rule_util.py
3 File(s) 6,650 bytes
2 Dir(s) 191,469,015,040 bytes free

C:\Users\jrault\AppData\Local\Programs\Python\Python36\Scripts\dummyrule>more parameters.json
{
"Parameters": {
"RuleName": "dummyrule",
"SourceRuntime": "python3.6",
"CodeKey": "dummyrule.zip",
"InputParameters": "{}",
"SourceEvents": "AWS::EC2:Instances",
"SourcePeriodic": "TwentyFour_Hours"
}
}

(parameter.json is unchanged)

C:\Users\jrault\AppData\Local\Programs\Python\Python36\Scripts>python rdk deploy dummyrule
Running deploy!
Zipping dummyrule
Uploading dummyrule
Creating CloudFormation Stack for dummyrule
Waiting for CloudFormation stack operation to complete...
Waiting for CloudFormation stack operation to complete...
Waiting for CloudFormation stack operation to complete...
Waiting for CloudFormation stack operation to complete...
Waiting for CloudFormation stack operation to complete...
Waiting for CloudFormation stack operation to complete...
Waiting for CloudFormation stack operation to complete...
Waiting for CloudFormation stack operation to complete...
Waiting for CloudFormation stack operation to complete...
Config deploy complete.

2018-01-28 Status Type Logical ID Status Reason
15:52:40 UTC+0800 ROLLBACK_COMPLETE AWS::CloudFormation::Stack dummyrule 15:52:38 UTC+0800 DELETE_COMPLETE AWS::IAM::Role rdkLambdaRole 15:52:37 UTC+0800 DELETE_IN_PROGRESS AWS::IAM::Role rdkLambdaRole 15:52:36 UTC+0800 DELETE_COMPLETE AWS::Lambda::Function rdkRuleCodeLambda 15:52:23 UTC+0800 ROLLBACK_IN_PROGRESS AWS::CloudFormation::Stack dummyrule The following resource(s) failed to create: [rdkRuleCodeLambda]. . Rollback requested by user. 15:52:22 UTC+0800 CREATE_FAILED AWS::Lambda::Function rdkRuleCodeLambda Error occurred while GetObject. S3 Error Code: NoSuchKey. S3 Error Message: The specified key does not exist. 15:52:12 UTC+0800 CREATE_IN_PROGRESS AWS::Lambda::Function rdkRuleCodeLambda 15:52:09 UTC+0800 CREATE_COMPLETE AWS::IAM::Role rdkLambdaRole 15:51:52 UTC+0800 CREATE_IN_PROGRESS AWS::IAM::Role rdkLambdaRole Resource creation Initiated 15:51:52 UTC+0800 CREATE_IN_PROGRESS AWS::IAM::Role rdkLambdaRole 15:51:49 UTC+0800 CREATE_IN_PROGRESS AWS::CloudFormation::Stack dummyrule User Initiated   15:52:40 UTC+0800 ROLLBACK_COMPLETE AWS::CloudFormation::Stack
  15:52:40 UTC+0800 ROLLBACK_COMPLETE AWS::CloudFormation::Stack dummyrule
  15:52:38 UTC+0800 DELETE_COMPLETE AWS::IAM::Role rdkLambdaRole
  15:52:37 UTC+0800 DELETE_IN_PROGRESS AWS::IAM::Role rdkLambdaRole
  15:52:36 UTC+0800 DELETE_COMPLETE AWS::Lambda::Function rdkRuleCodeLambda
  15:52:23 UTC+0800 ROLLBACK_IN_PROGRESS AWS::CloudFormation::Stack dummyrule
  15:52:22 UTC+0800 CREATE_FAILED AWS::Lambda::Function rdkRuleCodeLambda
  15:52:12 UTC+0800 CREATE_IN_PROGRESS AWS::Lambda::Function rdkRuleCodeLambda
  15:52:09 UTC+0800 CREATE_COMPLETE AWS::IAM::Role rdkLambdaRole
  15:51:52 UTC+0800 CREATE_IN_PROGRESS AWS::IAM::Role rdkLambdaRole
  15:51:52 UTC+0800 CREATE_IN_PROGRESS AWS::IAM::Role rdkLambdaRole
  15:51:49 UTC+0800 CREATE_IN_PROGRESS AWS::CloudFormation::Stack dummyrule

C:\Users\jrault\AppData\Local\Programs\Python\Python36\Scripts>aws s3 ls s3://config-rule-code-bucket-XXXXXXX4688eu-west-1
2018-01-28 15:51:45 3082 dummyrule\dummyrule.zip

Tried that too:
C:\Users\jrault\AppData\Local\Programs\Python\Python36\Scripts\dummyrule>python ../rdk deploy dummyrule
Running deploy!
Traceback (most recent call last):
File "../rdk", line 32, in
return_val = my_rdk.process_command()
File "C:\Users\jrault\AppData\Local\Programs\Python\Python36\lib\site-packages\rdk\rdk.py", line 50, in process_command
exit_code = method_to_call()
File "C:\Users\jrault\AppData\Local\Programs\Python\Python36\lib\site-packages\rdk\rdk.py", line 294, in deploy
my_rule_params = self.__get_rule_parameters(rule_name)
File "C:\Users\jrault\AppData\Local\Programs\Python\Python36\lib\site-packages\rdk\rdk.py", line 690, in __get_rule_parameters
parameters_file = open(params_file_path, 'r')
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\jrault\AppData\Local\Programs\Python\Python36\Scripts\dummyrule\dummyrule\parameters.json'

from aws-config-rdk.

michaelborchert avatar michaelborchert commented on May 19, 2024

Should be fixed now in the pypi version - was using the OS path separator for constructing the S3 key in the rdk code and hardcoding "/" in the CFN template. Worked fine on mac/linux, but not Windows. Am now forcing "/" so should work on any OS.

from aws-config-rdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.