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

CREATE_FAILED when running "cdk deploy" #82

Closed
derektumulak opened this issue Jul 20, 2019 · 6 comments
Closed

CREATE_FAILED when running "cdk deploy" #82

derektumulak opened this issue Jul 20, 2019 · 6 comments
Assignees
Labels
bug This issue is a bug. language/typescript Related to Typescript examples

Comments

@derektumulak
Copy link

derektumulak commented Jul 20, 2019

Hi, I am new to CDK and considering using it. I am trying to get the AppSyncGraphQLDynamoDB example working. When I run cdk deploy I get the following error:

  0/12 | 08:47:22 | CREATE_IN_PROGRESS   | AWS::IAM::Role              | ItemsDynamoDBRole (ItemsDynamoDBRole7D2E3F6D) 
  0/12 | 08:47:22 | CREATE_IN_PROGRESS   | AWS::IAM::Role              | ItemsDynamoDBRole (ItemsDynamoDBRole7D2E3F6D) Resource creation Initiated
  0/12 | 08:47:22 | CREATE_IN_PROGRESS   | AWS::DynamoDB::Table        | ItemsTable (ItemsTable5AAC2C46) Resource creation Initiated
  1/12 | 08:47:22 | CREATE_FAILED        | AWS::IAM::Role              | ItemsDynamoDBRole (ItemsDynamoDBRole7D2E3F6D) ARN arn:aws:iam::aws:policy/arn:aws:iam::aws:policy/AmazonDynamoDBFullAccess is not valid. (Service: AmazonIdentityManagement; Status Code: 400; Error Code: InvalidInput; Request ID: fda7a95a-aaca-11e9-8b34-71c203c1eb46)
        new Role (/home/ec2-user/environment/kloudkrypt/node_modules/@aws-cdk/aws-iam/lib/role.js:30:22)
        \_ new AppSyncCdkStack (/home/ec2-user/environment/kloudkrypt/index.js:50:32)
        \_ Object.<anonymous> (/home/ec2-user/environment/kloudkrypt/index.js:130:1)
        \_ Module._compile (module.js:653:30)
        \_ Object.Module._extensions..js (module.js:664:10)
        \_ Module.load (module.js:566:32)
        \_ tryModuleLoad (module.js:506:12)
        \_ Function.Module._load (module.js:498:3)
        \_ Function.Module.runMain (module.js:694:10)
        \_ startup (bootstrap_node.js:204:16)
        \_ bootstrap_node.js:625:3

Any suggestions?

Thanks,
-Derek

@rhboyd
Copy link
Contributor

rhboyd commented Jul 21, 2019

I'll dig into the example to find the bug, but it's probably related to a change in how AWS-managed policies are referenced.

arn:aws:iam::aws:policy/arn:aws:iam::aws:policy/AmazonDynamoDBFullAccess

should be
arn:aws:iam::aws:policy/AmazonDynamoDBFullAccess

It used to require the full ARN, but a recent change in CDK made it possible to just specify the name and the toolkit will prepend the rest of the ARN.

@rhboyd
Copy link
Contributor

rhboyd commented Jul 21, 2019

Here's the change you should make locally to get it to work

83e181e

@derektumulak
Copy link
Author

derektumulak commented Jul 21, 2019

Thank you for the quick response Richard. That got me past the error. Another error has now shown up:

 5/12 | 23:37:25 | CREATE_FAILED        | AWS::AppSync::Resolver      | GetAllQueryResolver No data source found named ItemsDynamoDataSource (Service: AWSAppSync; Status Code: 404; Error Code: NotFoundException; Request ID: 7dffc897-ac10-11e9-9f96-cbb7bbb1a52a)

Best,
-Derek

@yyolk
Copy link

yyolk commented Jul 24, 2019

@derektumulak I get the same error as you. see #78 if you want a workaround for that example until @rhboyd comments in that PR are addressed

@derektumulak
Copy link
Author

derektumulak commented Jul 24, 2019 via email

@SomayaB SomayaB added bug This issue is a bug. language/typescript Related to Typescript examples labels Nov 6, 2019
@NGL321
Copy link
Contributor

NGL321 commented Nov 14, 2019

It looks like the initial bug discovered here was resolved in #86, and the second bug is encapsulated under #78.

I am going to close this issue for now as resolved. Feel free to re-open if I am incorrect.

😸

@NGL321 NGL321 closed this as completed Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. language/typescript Related to Typescript examples
Projects
None yet
Development

No branches or pull requests

5 participants