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

CDK WorkShop Issue with cdk bootstrap command on Windows 7 Professional #11010

Closed
Blyseur opened this issue Oct 21, 2020 · 2 comments
Closed
Assignees
Labels
guidance Question that needs advice or information.

Comments

@Blyseur
Copy link

Blyseur commented Oct 21, 2020

In the CDK WorkShop, when we add our first lambda function, we have to import @aws-cdk/aws-lambda. Once, we write the code and we want to deploy, we have an error occured because of the bootstrapping

Reproduction Steps

On Windows, init a cdk project, follow the steps until arrived to the lambda function step.
https://cdkworkshop.com/20-typescript/30-hello-cdk/200-lambda.html

What did you expect to happen?

Deploy correctly CdkWorkshopStack

What actually happened?

We obtain an error, where it is sayed we must deployed the toolkit stack.

IAM Statement Changes
┌───┬─────────────────────────────────┬────────┬────────────────┬──────────────────────────────┬───────────┐
│ │ Resource │ Effect │ Action │ Principal │ Condition │
├───┼─────────────────────────────────┼────────┼────────────────┼──────────────────────────────┼───────────┤
│ + │ ${HelloHandler/ServiceRole.Arn} │ Allow │ sts:AssumeRole │ Service:lambda.amazonaws.com │ │
└───┴─────────────────────────────────┴────────┴────────────────┴──────────────────────────────┴───────────┘
IAM Policy Changes
┌───┬─────────────────────────────┬────────────────────────────────────────────────────────────────────────────────┐
│ │ Resource │ Managed Policy ARN │
├───┼─────────────────────────────┼────────────────────────────────────────────────────────────────────────────────┤
│ + │ ${HelloHandler/ServiceRole} │ arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole │
└───┴─────────────────────────────┴────────────────────────────────────────────────────────────────────────────────┘
(NOTE: There may be security-related changes not in this list. See #1299)

Do you wish to deploy these changes (y/n)? y
CdkWorkshopStack: deploying...

 CdkWorkshopStack failed: Error: This stack uses assets, so the toolkit stack must be deployed to the environment (Run "cdk bootstrap aws://unknown-account/unknown-region")
    at Object.addMetadataAssetsToManifest (C:\Users\Toto\AppData\Roaming\npm\node_modules\aws-cdk\lib\assets.ts:27:11)
    at Object.deployStack (C:\Users\Toto\AppData\Roaming\npm\node_modules\aws-cdk\lib\api\deploy-stack.ts:207:29)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at CdkToolkit.deploy (C:\Users\Toto\AppData\Roaming\npm\node_modules\aws-cdk\lib\cdk-toolkit.ts:180:24)
    at initCommandLine (C:\Users\Toto\AppData\Roaming\npm\node_modules\aws-cdk\bin\cdk.ts:197:9)
This stack uses assets, so the toolkit stack must be deployed to the environment (Run "cdk bootstrap aws://unknown-account/unknown-region")

So, at this moment, we run cdk bootstrap and an other error occured :

 ⏳  Bootstrapping environment aws://unknown-account/unknown-region...
 ❌  Environment aws://unknown-account/unknown-region failed bootstrapping: [Error: ENOENT: no such file or directory, mkdtemp 'C:\Users\Toto\Documents\cdk-workshop\ASIA......\........\......\......\......\......\......\......\......\......\......\cdk-bootstrapXXXXXX'] {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'mkdtemp',
  path: 'C:\\Users\\Toto\\Documents\\cdk-workshop\\ASIA......\......\\......\\......\......\\......\\......\\......\\......\\......\\......\\......\\......\\......\\......\\cdk-bootstrapXXXXXX'
}
ENOENT: no such file or directory, mkdtemp 'C:\\Users\\Toto\\Documents\\cdk-workshop\\ASIA......\......\\......\\......\......\\......\\......\\......\\......\\......\\......\\......\\......\\......\\......\\cdk-bootstrapXXXXXX'

Environment

  • CLI Version : aws-cli/1.18.160
  • Framework Version:
  • Node.js Version: v12.14.0
  • OS : Windows 7 Professional
  • Language (Version):

This is 🐛 Bug Report

@SomayaB
Copy link
Contributor

SomayaB commented Oct 26, 2020

Hi @Blyseur, I opened a new issue to redirect this discussion to the workshop repo. aws-samples/aws-cdk-intro-workshop#173

@SomayaB SomayaB closed this as completed Oct 26, 2020
@SomayaB SomayaB self-assigned this Oct 26, 2020
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@SomayaB SomayaB added guidance Question that needs advice or information. and removed needs-triage This issue or PR still needs to be triaged. bug This issue is a bug. labels Oct 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
guidance Question that needs advice or information.
Projects
None yet
Development

No branches or pull requests

2 participants