Code Monkey home page Code Monkey logo

blogpost-cdk-mwaa's Introduction

Using AWS CDK with Amazon Managed Workflows for Apache Airflow environment

This is a repository contains AWS CDK sample code that is used in this blog post, and shows you how to use this to configure an Amazon Managed Workflow Apache Airflow environment.

A related post, Setting up MWAA to use a KMS key is how to configure KMS using the code in this repo.

blogpost-cdk-mwaa's People

Contributors

094459 avatar ricsue-aws avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

blogpost-cdk-mwaa's Issues

deploy env failed

Hi,

the command : cdk deploy MWAA-Environment
generate following error:

MWAA-Environment: deploying...

❌ MWAA-Environment failed: Error: This stack uses assets, so the toolkit stack must be deployed to the environment (Run "cdk bootstrap aws://773637102482/eu-west-2")
at addMetadataAssetsToManifest (C:\ProgramData\nvm\v12.13.1\node_modules\aws-cdk\lib\assets.ts:27:11)
at deployStack (C:\ProgramData\nvm\v12.13.1\node_modules\aws-cdk\lib\api\deploy-stack.ts:237:29)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at CdkToolkit.deploy (C:\ProgramData\nvm\v12.13.1\node_modules\aws-cdk\lib\cdk-toolkit.ts:209:24)
at initCommandLine (C:\ProgramData\nvm\v12.13.1\node_modules\aws-cdk\lib\cli.ts:342:12)

if i run cdk bootstrap: the error returned id:

⏳ Bootstrapping environment aws://773637102482/eu-west-2...
Trusted accounts for deployment: (none)
Trusted accounts for lookup: (none)
Using default execution policy of 'arn:aws:iam::aws:policy/AdministratorAccess'. Pass '--cloudformation-execution-policies' to customize.
CDKToolkit: creating CloudFormation changeset...
CDKToolkit | 0/12 | 12:01:16 PM | REVIEW_IN_PROGRESS | AWS::CloudFormation::Stack | CDKToolkit User Initiated
CDKToolkit | 0/12 | 12:01:24 PM | CREATE_IN_PROGRESS | AWS::CloudFormation::Stack | CDKToolkit User Initiated
CDKToolkit | 0/12 | 12:01:29 PM | CREATE_IN_PROGRESS | AWS::IAM::Role | ImagePublishingRole
CDKToolkit | 0/12 | 12:01:29 PM | CREATE_IN_PROGRESS | AWS::S3::Bucket | StagingBucket
CDKToolkit | 0/12 | 12:01:29 PM | CREATE_IN_PROGRESS | AWS::IAM::Role | FilePublishingRole
CDKToolkit | 0/12 | 12:01:29 PM | CREATE_IN_PROGRESS | AWS::IAM::Role | CloudFormationExecutionRole
CDKToolkit | 0/12 | 12:01:29 PM | CREATE_IN_PROGRESS | AWS::ECR::Repository | ContainerAssetsRepository
CDKToolkit | 0/12 | 12:01:29 PM | CREATE_IN_PROGRESS | AWS::IAM::Role | LookupRole
CDKToolkit | 0/12 | 12:01:29 PM | CREATE_IN_PROGRESS | AWS::SSM::Parameter | CdkBootstrapVersion
CDKToolkit | 0/12 | 12:01:29 PM | CREATE_FAILED | AWS::S3::Bucket | StagingBucket cdk-hnb659fds-assets-773637102482-eu-west-2 already exists
CDKToolkit | 0/12 | 12:01:29 PM | CREATE_FAILED | AWS::IAM::Role | CloudFormationExecutionRole Resource creation cancelled
CDKToolkit | 0/12 | 12:01:29 PM | CREATE_FAILED | AWS::IAM::Role | LookupRole Resource creation cancelled
CDKToolkit | 0/12 | 12:01:29 PM | CREATE_FAILED | AWS::IAM::Role | FilePublishingRole Failed to fetch resource hooks to invoke for the resource
CDKToolkit | 0/12 | 12:01:29 PM | CREATE_FAILED | AWS::ECR::Repository | ContainerAssetsRepository Resource creation cancelled
CDKToolkit | 0/12 | 12:01:30 PM | CREATE_FAILED | AWS::SSM::Parameter | CdkBootstrapVersion Resource creation cancelled
CDKToolkit | 0/12 | 12:01:30 PM | CREATE_FAILED | AWS::IAM::Role | ImagePublishingRole Failed to fetch resource hooks to invoke for the resource
CDKToolkit | 0/12 | 12:01:30 PM | ROLLBACK_IN_PROGRESS | AWS::CloudFormation::Stack | CDKToolkit The following resource(s) failed to create: [ImagePublishingRole, FilePublishingRole, CdkBootstrapVersion, LookupRole, StagingBucket, CloudFormationExecutionRole, ContainerAssetsRepository]. Rollback requested by user.
CDKToolkit | 0/12 | 12:01:37 PM | DELETE_SKIPPED | AWS::S3::Bucket | StagingBucket
CDKToolkit | 1/12 | 12:01:37 PM | DELETE_COMPLETE | AWS::IAM::Role | ImagePublishingRole
CDKToolkit | 2/12 | 12:01:37 PM | DELETE_COMPLETE | AWS::IAM::Role | CloudFormationExecutionRole
CDKToolkit | 3/12 | 12:01:37 PM | DELETE_COMPLETE | AWS::SSM::Parameter | CdkBootstrapVersion
CDKToolkit | 4/12 | 12:01:37 PM | DELETE_COMPLETE | AWS::IAM::Role | FilePublishingRole
CDKToolkit | 5/12 | 12:01:37 PM | DELETE_COMPLETE | AWS::ECR::Repository | ContainerAssetsRepository
CDKToolkit | 6/12 | 12:01:37 PM | DELETE_COMPLETE | AWS::IAM::Role | LookupRole
CDKToolkit | 7/12 | 12:01:38 PM | ROLLBACK_COMPLETE | AWS::CloudFormation::Stack | CDKToolkit

Failed resources:
CDKToolkit | 12:01:29 PM | CREATE_FAILED | AWS::S3::Bucket | StagingBucket cdk-hnb659fds-assets-773637102482-eu-west-2 already exists
CDKToolkit | 12:01:29 PM | CREATE_FAILED | AWS::IAM::Role | FilePublishingRole Failed to fetch resource hooks to invoke for the resource
CDKToolkit | 12:01:30 PM | CREATE_FAILED | AWS::IAM::Role | ImagePublishingRole Failed to fetch resource hooks to invoke for the resource
❌ Environment aws://773637102482/eu-west-2 failed bootstrapping: Error: The stack named CDKToolkit failed creation, it may need to be manually deleted from the AWS console: ROLLBACK_COMPLETE
at waitForStackDeploy (C:\ProgramData\nvm\v12.13.1\node_modules\aws-cdk\lib\api\util\cloudformation.ts:311:11)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at prepareAndExecuteChangeSet (C:\ProgramData\nvm\v12.13.1\node_modules\aws-cdk\lib\api\deploy-stack.ts:376:26)
at C:\ProgramData\nvm\v12.13.1\node_modules\aws-cdk\lib\cdk-toolkit.ts:575:24
at async Promise.all (index 0)
at CdkToolkit.bootstrap (C:\ProgramData\nvm\v12.13.1\node_modules\aws-cdk\lib\cdk-toolkit.ts:572:5)
at initCommandLine (C:\ProgramData\nvm\v12.13.1\node_modules\aws-cdk\lib\cli.ts:342:12)

Thanks

Creation failed (RequestToken: HandlerErrorCode: NotStabilized)

When deploying the MWAA environment, get the following error:

14:59:15 | CREATE_FAILED        | AWS::MWAA::Environment         | airflowtestenvironment
Resource handler returned message: "Creation failed" (RequestToken: 5b5b5a02-8cee-e48a-66ea-a07a8b1ad41a, HandlerErrorCode: NotStabilized)

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.