diff --git a/packages/@aws-cdk/aws-cloudformation/README.md b/packages/@aws-cdk/aws-cloudformation/README.md index b33d5b40ebc9e..4c13bb1f6fcc6 100644 --- a/packages/@aws-cdk/aws-cloudformation/README.md +++ b/packages/@aws-cdk/aws-cloudformation/README.md @@ -82,88 +82,3 @@ See the following section of the docs on details to write Custom Resources: * [Introduction](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-custom-resources.html) * [Reference](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/crpg-ref.html) * [Code Reference](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-code.html) - -#### AWS Custom Resource -Sometimes a single API call can fill the gap in the CloudFormation coverage. In -this case you can use the `AwsCustomResource` construct. This construct creates -a custom resource that can be customized to make specific API calls for the -`CREATE`, `UPDATE` and `DELETE` events. Additionally, data returned by the API -call can be extracted and used in other constructs/resources (creating a real -CloudFormation dependency using `Fn::GetAtt` under the hood). - -The physical id of the custom resource can be specified or derived from the data -returned by the API call. - -The `AwsCustomResource` uses the AWS SDK for JavaScript. Services, actions and -parameters can be found in the [API documentation](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/index.html). - -Path to data must be specified using a dot notation, e.g. to get the string value -of the `Title` attribute for the first item returned by `dynamodb.query` it should -be `Items.0.Title.S`. - -##### Examples -Verify a domain with SES: - -```ts -const verifyDomainIdentity = new AwsCustomResource(this, 'VerifyDomainIdentity', { - onCreate: { - service: 'SES', - action: 'verifyDomainIdentity', - parameters: { - Domain: 'example.com' - }, - physicalResourceIdPath: 'VerificationToken' // Use the token returned by the call as physical id - } -}); - -new route53.TxtRecord(zone, 'SESVerificationRecord', { - recordName: `_amazonses.example.com`, - recordValue: verifyDomainIdentity.getData('VerificationToken') -}); -``` - -Get the latest version of a secure SSM parameter: - -```ts -const getParameter = new AwsCustomResource(this, 'GetParameter', { - onUpdate: { // will also be called for a CREATE event - service: 'SSM', - action: 'getParameter', - parameters: { - Name: 'my-parameter', - WithDecryption: true - }, - physicalResourceId: Date.now().toString() // Update physical id to always fetch the latest version - } -}); - -// Use the value in another construct with -getParameter.getData('Parameter.Value') -``` - -IAM policy statements required to make the API calls are derived from the calls -and allow by default the actions to be made on all resources (`*`). You can -restrict the permissions by specifying your own list of statements with the -`policyStatements` prop. - -Chained API calls can be achieved by creating dependencies: -```ts -const awsCustom1 = new AwsCustomResource(this, 'API1', { - onCreate: { - service: '...', - action: '...', - physicalResourceId: '...' - } -}); - -const awsCustom2 = new AwsCustomResource(this, 'API2', { - onCreate: { - service: '...', - action: '...' - parameters: { - text: awsCustom1.getData('Items.0.text') - }, - physicalResourceId: '...' - } -}) -``` diff --git a/packages/@aws-cdk/aws-cloudformation/lib/index.ts b/packages/@aws-cdk/aws-cloudformation/lib/index.ts index d8bf5b68fb613..3d4971d16542b 100644 --- a/packages/@aws-cdk/aws-cloudformation/lib/index.ts +++ b/packages/@aws-cdk/aws-cloudformation/lib/index.ts @@ -1,6 +1,5 @@ export * from './cloud-formation-capabilities'; export * from './custom-resource'; -export * from './aws-custom-resource'; // AWS::CloudFormation CloudFormation Resources: export * from './cloudformation.generated'; diff --git a/packages/@aws-cdk/aws-cloudformation/package-lock.json b/packages/@aws-cdk/aws-cloudformation/package-lock.json index cd40533cbfa97..0be50ff8af784 100644 --- a/packages/@aws-cdk/aws-cloudformation/package-lock.json +++ b/packages/@aws-cdk/aws-cloudformation/package-lock.json @@ -4,399 +4,11 @@ "lockfileVersion": 1, "requires": true, "dependencies": { - "@sinonjs/commons": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.4.0.tgz", - "integrity": "sha512-9jHK3YF/8HtJ9wCAbG+j8cD0i0+ATS9A7gXFqS36TblLPNy6rEEc+SB0imo91eCboGaBYGV/MT1/br/J+EE7Tw==", - "dev": true, - "requires": { - "type-detect": "4.0.8" - } - }, - "@sinonjs/formatio": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-3.2.1.tgz", - "integrity": "sha512-tsHvOB24rvyvV2+zKMmPkZ7dXX6LSLKZ7aOtXY6Edklp0uRcgGpOsQTTGTcWViFyx4uhWc6GV8QdnALbIbIdeQ==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1", - "@sinonjs/samsam": "^3.1.0" - } - }, - "@sinonjs/samsam": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-3.3.1.tgz", - "integrity": "sha512-wRSfmyd81swH0hA1bxJZJ57xr22kC07a1N4zuIL47yTS04bDk6AoCkczcqHEjcRPmJ+FruGJ9WBQiJwMtIElFw==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.0.2", - "array-from": "^2.1.1", - "lodash": "^4.17.11" - } - }, - "@sinonjs/text-encoding": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", - "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", - "dev": true - }, "@types/aws-lambda": { "version": "8.10.27", "resolved": "https://registry.npmjs.org/@types/aws-lambda/-/aws-lambda-8.10.27.tgz", "integrity": "sha512-9QjcjORRtgG5KPVHWqGZ0F2Uo/ALUWQ5D7qfJEco0fEjoSbA908w05RXql7YPS72jQ1w6I+pr+8pQPqBPlYnSw==", "dev": true - }, - "@types/nock": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/@types/nock/-/nock-10.0.3.tgz", - "integrity": "sha512-OthuN+2FuzfZO3yONJ/QVjKmLEuRagS9TV9lEId+WHL9KhftYG+/2z+pxlr0UgVVXSpVD8woie/3fzQn8ft/Ow==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/node": { - "version": "12.0.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.5.tgz", - "integrity": "sha512-CFLSALoE+93+Hcb5pFjp0J1uMrrbLRe+L1+gFwerJ776R3TACSF0kTVRQ7AvRa7aFx70nqYHAc7wQPlt9kY2Mg==", - "dev": true - }, - "@types/sinon": { - "version": "7.0.13", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-7.0.13.tgz", - "integrity": "sha512-d7c/C/+H/knZ3L8/cxhicHUiTDxdgap0b/aNJfsmLwFu/iOP17mdgbQsbHA3SJmrzsjD0l3UEE5SN4xxuz5ung==", - "dev": true - }, - "array-from": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/array-from/-/array-from-2.1.1.tgz", - "integrity": "sha1-z+nYwmYoudxa7MYqn12PHzUsEZU=", - "dev": true - }, - "assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", - "dev": true - }, - "aws-sdk": { - "version": "2.469.0", - "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.469.0.tgz", - "integrity": "sha512-VaIrO3aBX83gKkBPk9xM0RHmu7fmq76kaF0SqbsWlPImgxc5foJ4rBlRMMlmeNogFZZ/XTQdI+gkFDVosV14Ig==", - "requires": { - "buffer": "4.9.1", - "events": "1.1.1", - "ieee754": "1.1.8", - "jmespath": "0.15.0", - "querystring": "0.2.0", - "sax": "1.2.1", - "url": "0.10.3", - "uuid": "3.3.2", - "xml2js": "0.4.19" - } - }, - "aws-sdk-mock": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/aws-sdk-mock/-/aws-sdk-mock-4.4.0.tgz", - "integrity": "sha512-cnR2Sff2jSO2UazeGL3rp4ulg66I8mVeCWvKZk0Bb+s//b5sUDZ1OhvOqr7v6uRJKhgaikeZJdZtI6efHYsN2Q==", - "dev": true, - "requires": { - "aws-sdk": "^2.431.0", - "sinon": "^7.3.1", - "traverse": "^0.6.6" - } - }, - "base64-js": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", - "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==" - }, - "buffer": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", - "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - } - }, - "chai": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", - "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==", - "dev": true, - "requires": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^3.0.1", - "get-func-name": "^2.0.0", - "pathval": "^1.1.0", - "type-detect": "^4.0.5" - } - }, - "check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", - "dev": true - }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "deep-eql": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", - "dev": true, - "requires": { - "type-detect": "^4.0.0" - } - }, - "deep-equal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", - "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=", - "dev": true - }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - }, - "events": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", - "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=" - }, - "get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "ieee754": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz", - "integrity": "sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q=" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "jmespath": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz", - "integrity": "sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc=" - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true - }, - "just-extend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.0.2.tgz", - "integrity": "sha512-FrLwOgm+iXrPV+5zDU6Jqu4gCRXbWEQg2O3SKONsWE4w7AXFRkryS53bpWdaL9cNol+AmR3AEYz6kn+o0fCPnw==", - "dev": true - }, - "lodash": { - "version": "4.17.11", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", - "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", - "dev": true - }, - "lolex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-4.1.0.tgz", - "integrity": "sha512-BYxIEXiVq5lGIXeVHnsFzqa1TxN5acnKnPCdlZSpzm8viNEOhiigupA4vTQ9HEFQ6nLTQ9wQOgBknJgzUYQ9Aw==", - "dev": true - }, - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - }, - "nise": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/nise/-/nise-1.5.0.tgz", - "integrity": "sha512-Z3sfYEkLFzFmL8KY6xnSJLRxwQwYBjOXi/24lb62ZnZiGA0JUzGGTI6TBIgfCSMIDl9Jlu8SRmHNACLTemDHww==", - "dev": true, - "requires": { - "@sinonjs/formatio": "^3.1.0", - "@sinonjs/text-encoding": "^0.7.1", - "just-extend": "^4.0.2", - "lolex": "^4.1.0", - "path-to-regexp": "^1.7.0" - } - }, - "nock": { - "version": "10.0.6", - "resolved": "https://registry.npmjs.org/nock/-/nock-10.0.6.tgz", - "integrity": "sha512-b47OWj1qf/LqSQYnmokNWM8D88KvUl2y7jT0567NB3ZBAZFz2bWp2PC81Xn7u8F2/vJxzkzNZybnemeFa7AZ2w==", - "dev": true, - "requires": { - "chai": "^4.1.2", - "debug": "^4.1.0", - "deep-equal": "^1.0.0", - "json-stringify-safe": "^5.0.1", - "lodash": "^4.17.5", - "mkdirp": "^0.5.0", - "propagate": "^1.0.0", - "qs": "^6.5.1", - "semver": "^5.5.0" - } - }, - "path-to-regexp": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", - "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", - "dev": true, - "requires": { - "isarray": "0.0.1" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - } - } - }, - "pathval": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", - "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", - "dev": true - }, - "propagate": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/propagate/-/propagate-1.0.0.tgz", - "integrity": "sha1-AMLa7t2iDofjeCs0Stuhzd1q1wk=", - "dev": true - }, - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" - }, - "qs": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", - "dev": true - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" - }, - "sax": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz", - "integrity": "sha1-e45lYZCyKOgaZq6nSEgNgozS03o=" - }, - "semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", - "dev": true - }, - "sinon": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-7.3.2.tgz", - "integrity": "sha512-thErC1z64BeyGiPvF8aoSg0LEnptSaWE7YhdWWbWXgelOyThent7uKOnnEh9zBxDbKixtr5dEko+ws1sZMuFMA==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.4.0", - "@sinonjs/formatio": "^3.2.1", - "@sinonjs/samsam": "^3.3.1", - "diff": "^3.5.0", - "lolex": "^4.0.1", - "nise": "^1.4.10", - "supports-color": "^5.5.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "traverse": { - "version": "0.6.6", - "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz", - "integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=", - "dev": true - }, - "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true - }, - "url": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", - "integrity": "sha1-Ah5NnHcF8hu/N9A861h2dAJ3TGQ=", - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - } - }, - "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" - }, - "xml2js": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", - "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", - "requires": { - "sax": ">=0.6.0", - "xmlbuilder": "~9.0.1" - } - }, - "xmlbuilder": { - "version": "9.0.7", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", - "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=" } } } diff --git a/packages/@aws-cdk/aws-cloudformation/package.json b/packages/@aws-cdk/aws-cloudformation/package.json index 81adf8d7071d1..8cf221bcc2265 100644 --- a/packages/@aws-cdk/aws-cloudformation/package.json +++ b/packages/@aws-cdk/aws-cloudformation/package.json @@ -67,26 +67,17 @@ "@aws-cdk/aws-events": "^0.35.0", "@aws-cdk/aws-ssm": "^0.35.0", "@types/aws-lambda": "^8.10.27", - "@types/nock": "^10.0.3", - "@types/sinon": "^7.0.13", - "aws-sdk-mock": "^4.4.0", "cdk-build-tools": "^0.35.0", "cdk-integ-tools": "^0.35.0", "cfn2ts": "^0.35.0", - "nock": "^10.0.6", - "pkglint": "^0.35.0", - "sinon": "^7.3.2" + "pkglint": "^0.35.0" }, "dependencies": { "@aws-cdk/aws-iam": "^0.35.0", "@aws-cdk/aws-lambda": "^0.35.0", "@aws-cdk/aws-sns": "^0.35.0", - "@aws-cdk/core": "^0.35.0", - "aws-sdk": "^2.409.0" + "@aws-cdk/core": "^0.35.0" }, - "bundledDependencies": [ - "aws-sdk" - ], "homepage": "https://github.com/awslabs/aws-cdk", "peerDependencies": { "@aws-cdk/aws-iam": "^0.35.0", diff --git a/packages/@aws-cdk/aws-events-targets/lib/ecs-task.ts b/packages/@aws-cdk/aws-events-targets/lib/ecs-task.ts index 97c325c12b26a..e3f0942d8e2d0 100644 --- a/packages/@aws-cdk/aws-events-targets/lib/ecs-task.ts +++ b/packages/@aws-cdk/aws-events-targets/lib/ecs-task.ts @@ -1,9 +1,9 @@ -import cloudformation = require('@aws-cdk/aws-cloudformation'); import ec2 = require('@aws-cdk/aws-ec2'); import ecs = require('@aws-cdk/aws-ecs'); import events = require ('@aws-cdk/aws-events'); import iam = require('@aws-cdk/aws-iam'); import { Stack } from '@aws-cdk/core'; +import custom = require('@aws-cdk/custom-resources'); import { ContainerOverride } from './ecs-task-properties'; import { singletonEventRole } from './util'; @@ -118,7 +118,7 @@ export class EcsTask implements events.IRuleTarget { const subnetSelection = this.props.subnetSelection || { subnetType: ec2.SubnetType.PRIVATE }; const assignPublicIp = subnetSelection.subnetType === ec2.SubnetType.PRIVATE ? 'DISABLED' : 'ENABLED'; - new cloudformation.AwsCustomResource(this.taskDefinition, 'PutTargets', { + new custom.AwsCustomResource(this.taskDefinition, 'PutTargets', { // `onCreate´ defaults to `onUpdate` and we don't need an `onDelete` here // because the rule/target will be owned by CF anyway. onUpdate: { diff --git a/packages/@aws-cdk/aws-events-targets/package.json b/packages/@aws-cdk/aws-events-targets/package.json index 4c4e171a31b4b..fb55d22951f84 100644 --- a/packages/@aws-cdk/aws-events-targets/package.json +++ b/packages/@aws-cdk/aws-events-targets/package.json @@ -87,6 +87,7 @@ "@aws-cdk/aws-events": "^0.35.0", "@aws-cdk/aws-iam": "^0.35.0", "@aws-cdk/aws-lambda": "^0.35.0", + "@aws-cdk/custom-resources": "^0.35.0", "@aws-cdk/aws-sns": "^0.35.0", "@aws-cdk/aws-sns-subscriptions": "^0.35.0", "@aws-cdk/aws-sqs": "^0.35.0", @@ -97,9 +98,10 @@ "peerDependencies": { "@aws-cdk/aws-cloudformation": "^0.35.0", "@aws-cdk/aws-codebuild": "^0.35.0", - "@aws-cdk/aws-codepipeline": "^0.35.0", "@aws-cdk/aws-ec2": "^0.35.0", + "@aws-cdk/aws-codepipeline": "^0.35.0", "@aws-cdk/aws-ecs": "^0.35.0", + "@aws-cdk/custom-resources": "^0.35.0", "@aws-cdk/aws-events": "^0.35.0", "@aws-cdk/aws-iam": "^0.35.0", "@aws-cdk/aws-lambda": "^0.35.0", diff --git a/packages/@aws-cdk/custom-resources/.gitignore b/packages/@aws-cdk/custom-resources/.gitignore new file mode 100644 index 0000000000000..205e21fe7353b --- /dev/null +++ b/packages/@aws-cdk/custom-resources/.gitignore @@ -0,0 +1,16 @@ +*.js +tsconfig.json +tslint.json +*.js.map +*.d.ts +*.generated.ts +dist +lib/generated/resources.ts +.jsii + +.LAST_BUILD +.nyc_output +coverage +.nycrc +.LAST_PACKAGE +*.snk \ No newline at end of file diff --git a/packages/@aws-cdk/custom-resources/.npmignore b/packages/@aws-cdk/custom-resources/.npmignore new file mode 100644 index 0000000000000..4a9a3886b71a4 --- /dev/null +++ b/packages/@aws-cdk/custom-resources/.npmignore @@ -0,0 +1,20 @@ +# Don't include original .ts files when doing `npm pack` +*.ts +!*.d.ts +coverage +.nyc_output +*.tgz + +dist +.LAST_PACKAGE +.LAST_BUILD +!*.js + +# Include .jsii +!.jsii + +*.snk + +*.tsbuildinfo + +lib/sdk-api-metadata.json diff --git a/packages/@aws-cdk/custom-resources/LICENSE b/packages/@aws-cdk/custom-resources/LICENSE new file mode 100644 index 0000000000000..46c185646b439 --- /dev/null +++ b/packages/@aws-cdk/custom-resources/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/@aws-cdk/custom-resources/NOTICE b/packages/@aws-cdk/custom-resources/NOTICE new file mode 100644 index 0000000000000..8585168af8b7d --- /dev/null +++ b/packages/@aws-cdk/custom-resources/NOTICE @@ -0,0 +1,2 @@ +AWS Cloud Development Kit (AWS CDK) +Copyright 2018-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/custom-resources/README.md b/packages/@aws-cdk/custom-resources/README.md new file mode 100644 index 0000000000000..81a99aaba7283 --- /dev/null +++ b/packages/@aws-cdk/custom-resources/README.md @@ -0,0 +1,104 @@ +## CDK Custom Resources + + +--- + +![Stability: Experimental](https://img.shields.io/badge/stability-Experimental-important.svg?style=for-the-badge) + +> **This is a _developer preview_ (public beta) module. Releases might lack important features and might have +> future breaking changes.** +> +> This API is still under active development and subject to non-backward +> compatible changes or removal in any future version. Use of the API is not recommended in production +> environments. Experimental APIs are not subject to the Semantic Versioning model. + +--- + + + +This module is part of the [AWS Cloud Development Kit](https://github.com/awslabs/aws-cdk) project. + +#### AWS Custom Resource +Sometimes a single API call can fill the gap in the CloudFormation coverage. In +this case you can use the `AwsCustomResource` construct. This construct creates +a custom resource that can be customized to make specific API calls for the +`CREATE`, `UPDATE` and `DELETE` events. Additionally, data returned by the API +call can be extracted and used in other constructs/resources (creating a real +CloudFormation dependency using `Fn::GetAtt` under the hood). + +The physical id of the custom resource can be specified or derived from the data +returned by the API call. + +The `AwsCustomResource` uses the AWS SDK for JavaScript. Services, actions and +parameters can be found in the [API documentation](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/index.html). + +Path to data must be specified using a dot notation, e.g. to get the string value +of the `Title` attribute for the first item returned by `dynamodb.query` it should +be `Items.0.Title.S`. + +##### Examples +Verify a domain with SES: + +```ts +const verifyDomainIdentity = new AwsCustomResource(this, 'VerifyDomainIdentity', { + onCreate: { + service: 'SES', + action: 'verifyDomainIdentity', + parameters: { + Domain: 'example.com' + }, + physicalResourceIdPath: 'VerificationToken' // Use the token returned by the call as physical id + } +}); + +new route53.TxtRecord(zone, 'SESVerificationRecord', { + recordName: `_amazonses.example.com`, + recordValue: verifyDomainIdentity.getData('VerificationToken') +}); +``` + +Get the latest version of a secure SSM parameter: + +```ts +const getParameter = new AwsCustomResource(this, 'GetParameter', { + onUpdate: { // will also be called for a CREATE event + service: 'SSM', + action: 'getParameter', + parameters: { + Name: 'my-parameter', + WithDecryption: true + }, + physicalResourceId: Date.now().toString() // Update physical id to always fetch the latest version + } +}); + +// Use the value in another construct with +getParameter.getData('Parameter.Value') +``` + +IAM policy statements required to make the API calls are derived from the calls +and allow by default the actions to be made on all resources (`*`). You can +restrict the permissions by specifying your own list of statements with the +`policyStatements` prop. + +Chained API calls can be achieved by creating dependencies: +```ts +const awsCustom1 = new AwsCustomResource(this, 'API1', { + onCreate: { + service: '...', + action: '...', + physicalResourceId: '...' + } +}); + +const awsCustom2 = new AwsCustomResource(this, 'API2', { + onCreate: { + service: '...', + action: '...' + parameters: { + text: awsCustom1.getData('Items.0.text') + }, + physicalResourceId: '...' + } +}) +``` diff --git a/packages/@aws-cdk/aws-cloudformation/lib/aws-custom-resource-provider/index.ts b/packages/@aws-cdk/custom-resources/lib/aws-custom-resource-provider/index.ts similarity index 100% rename from packages/@aws-cdk/aws-cloudformation/lib/aws-custom-resource-provider/index.ts rename to packages/@aws-cdk/custom-resources/lib/aws-custom-resource-provider/index.ts diff --git a/packages/@aws-cdk/aws-cloudformation/lib/aws-custom-resource.ts b/packages/@aws-cdk/custom-resources/lib/aws-custom-resource.ts similarity index 97% rename from packages/@aws-cdk/aws-cloudformation/lib/aws-custom-resource.ts rename to packages/@aws-cdk/custom-resources/lib/aws-custom-resource.ts index d5a376c25645b..9a97277b82d21 100644 --- a/packages/@aws-cdk/aws-cloudformation/lib/aws-custom-resource.ts +++ b/packages/@aws-cdk/custom-resources/lib/aws-custom-resource.ts @@ -1,9 +1,9 @@ +import { CustomResource, CustomResourceProvider } from '@aws-cdk/aws-cloudformation'; import iam = require('@aws-cdk/aws-iam'); import lambda = require('@aws-cdk/aws-lambda'); import cdk = require('@aws-cdk/core'); -import metadata = require('aws-sdk/apis/metadata.json'); import path = require('path'); -import { CustomResource, CustomResourceProvider } from './custom-resource'; +import metadata = require('./sdk-api-metadata.json'); /** * AWS SDK service metadata. diff --git a/packages/@aws-cdk/custom-resources/lib/index.ts b/packages/@aws-cdk/custom-resources/lib/index.ts new file mode 100644 index 0000000000000..05a6b1e1868e1 --- /dev/null +++ b/packages/@aws-cdk/custom-resources/lib/index.ts @@ -0,0 +1 @@ +export * from './aws-custom-resource'; diff --git a/packages/@aws-cdk/custom-resources/lib/sdk-api-metadata.json b/packages/@aws-cdk/custom-resources/lib/sdk-api-metadata.json new file mode 100644 index 0000000000000..9f39b3f7afc93 --- /dev/null +++ b/packages/@aws-cdk/custom-resources/lib/sdk-api-metadata.json @@ -0,0 +1,717 @@ +{ + "acm": { + "name": "ACM", + "cors": true + }, + "apigateway": { + "name": "APIGateway", + "cors": true + }, + "applicationautoscaling": { + "prefix": "application-autoscaling", + "name": "ApplicationAutoScaling", + "cors": true + }, + "appstream": { + "name": "AppStream" + }, + "autoscaling": { + "name": "AutoScaling", + "cors": true + }, + "batch": { + "name": "Batch" + }, + "budgets": { + "name": "Budgets" + }, + "clouddirectory": { + "name": "CloudDirectory", + "versions": [ + "2016-05-10*" + ] + }, + "cloudformation": { + "name": "CloudFormation", + "cors": true + }, + "cloudfront": { + "name": "CloudFront", + "versions": [ + "2013-05-12*", + "2013-11-11*", + "2014-05-31*", + "2014-10-21*", + "2014-11-06*", + "2015-04-17*", + "2015-07-27*", + "2015-09-17*", + "2016-01-13*", + "2016-01-28*", + "2016-08-01*", + "2016-08-20*", + "2016-09-07*", + "2016-09-29*", + "2016-11-25*", + "2017-03-25*", + "2017-10-30*", + "2018-06-18*" + ], + "cors": true + }, + "cloudhsm": { + "name": "CloudHSM", + "cors": true + }, + "cloudsearch": { + "name": "CloudSearch" + }, + "cloudsearchdomain": { + "name": "CloudSearchDomain" + }, + "cloudtrail": { + "name": "CloudTrail", + "cors": true + }, + "cloudwatch": { + "prefix": "monitoring", + "name": "CloudWatch", + "cors": true + }, + "cloudwatchevents": { + "prefix": "events", + "name": "CloudWatchEvents", + "versions": [ + "2014-02-03*" + ], + "cors": true + }, + "cloudwatchlogs": { + "prefix": "logs", + "name": "CloudWatchLogs", + "cors": true + }, + "codebuild": { + "name": "CodeBuild", + "cors": true + }, + "codecommit": { + "name": "CodeCommit", + "cors": true + }, + "codedeploy": { + "name": "CodeDeploy", + "cors": true + }, + "codepipeline": { + "name": "CodePipeline", + "cors": true + }, + "cognitoidentity": { + "prefix": "cognito-identity", + "name": "CognitoIdentity", + "cors": true + }, + "cognitoidentityserviceprovider": { + "prefix": "cognito-idp", + "name": "CognitoIdentityServiceProvider", + "cors": true + }, + "cognitosync": { + "prefix": "cognito-sync", + "name": "CognitoSync", + "cors": true + }, + "configservice": { + "prefix": "config", + "name": "ConfigService", + "cors": true + }, + "cur": { + "name": "CUR", + "cors": true + }, + "datapipeline": { + "name": "DataPipeline" + }, + "devicefarm": { + "name": "DeviceFarm", + "cors": true + }, + "directconnect": { + "name": "DirectConnect", + "cors": true + }, + "directoryservice": { + "prefix": "ds", + "name": "DirectoryService" + }, + "discovery": { + "name": "Discovery" + }, + "dms": { + "name": "DMS" + }, + "dynamodb": { + "name": "DynamoDB", + "cors": true + }, + "dynamodbstreams": { + "prefix": "streams.dynamodb", + "name": "DynamoDBStreams", + "cors": true + }, + "ec2": { + "name": "EC2", + "versions": [ + "2013-06-15*", + "2013-10-15*", + "2014-02-01*", + "2014-05-01*", + "2014-06-15*", + "2014-09-01*", + "2014-10-01*", + "2015-03-01*", + "2015-04-15*", + "2015-10-01*", + "2016-04-01*", + "2016-09-15*" + ], + "cors": true + }, + "ecr": { + "name": "ECR", + "cors": true + }, + "ecs": { + "name": "ECS", + "cors": true + }, + "efs": { + "prefix": "elasticfilesystem", + "name": "EFS", + "cors": true + }, + "elasticache": { + "name": "ElastiCache", + "versions": [ + "2012-11-15*", + "2014-03-24*", + "2014-07-15*", + "2014-09-30*" + ], + "cors": true + }, + "elasticbeanstalk": { + "name": "ElasticBeanstalk", + "cors": true + }, + "elb": { + "prefix": "elasticloadbalancing", + "name": "ELB", + "cors": true + }, + "elbv2": { + "prefix": "elasticloadbalancingv2", + "name": "ELBv2", + "cors": true + }, + "emr": { + "prefix": "elasticmapreduce", + "name": "EMR", + "cors": true + }, + "es": { + "name": "ES" + }, + "elastictranscoder": { + "name": "ElasticTranscoder", + "cors": true + }, + "firehose": { + "name": "Firehose", + "cors": true + }, + "gamelift": { + "name": "GameLift", + "cors": true + }, + "glacier": { + "name": "Glacier" + }, + "health": { + "name": "Health" + }, + "iam": { + "name": "IAM", + "cors": true + }, + "importexport": { + "name": "ImportExport" + }, + "inspector": { + "name": "Inspector", + "versions": [ + "2015-08-18*" + ], + "cors": true + }, + "iot": { + "name": "Iot", + "cors": true + }, + "iotdata": { + "prefix": "iot-data", + "name": "IotData", + "cors": true + }, + "kinesis": { + "name": "Kinesis", + "cors": true + }, + "kinesisanalytics": { + "name": "KinesisAnalytics" + }, + "kms": { + "name": "KMS", + "cors": true + }, + "lambda": { + "name": "Lambda", + "cors": true + }, + "lexruntime": { + "prefix": "runtime.lex", + "name": "LexRuntime", + "cors": true + }, + "lightsail": { + "name": "Lightsail" + }, + "machinelearning": { + "name": "MachineLearning", + "cors": true + }, + "marketplacecommerceanalytics": { + "name": "MarketplaceCommerceAnalytics", + "cors": true + }, + "marketplacemetering": { + "prefix": "meteringmarketplace", + "name": "MarketplaceMetering" + }, + "mturk": { + "prefix": "mturk-requester", + "name": "MTurk", + "cors": true + }, + "mobileanalytics": { + "name": "MobileAnalytics", + "cors": true + }, + "opsworks": { + "name": "OpsWorks", + "cors": true + }, + "opsworkscm": { + "name": "OpsWorksCM" + }, + "organizations": { + "name": "Organizations" + }, + "pinpoint": { + "name": "Pinpoint" + }, + "polly": { + "name": "Polly", + "cors": true + }, + "rds": { + "name": "RDS", + "versions": [ + "2014-09-01*" + ], + "cors": true + }, + "redshift": { + "name": "Redshift", + "cors": true + }, + "rekognition": { + "name": "Rekognition", + "cors": true + }, + "resourcegroupstaggingapi": { + "name": "ResourceGroupsTaggingAPI" + }, + "route53": { + "name": "Route53", + "cors": true + }, + "route53domains": { + "name": "Route53Domains", + "cors": true + }, + "s3": { + "name": "S3", + "dualstackAvailable": true, + "cors": true + }, + "s3control": { + "name": "S3Control", + "dualstackAvailable": true + }, + "servicecatalog": { + "name": "ServiceCatalog", + "cors": true + }, + "ses": { + "prefix": "email", + "name": "SES", + "cors": true + }, + "shield": { + "name": "Shield" + }, + "simpledb": { + "prefix": "sdb", + "name": "SimpleDB" + }, + "sms": { + "name": "SMS" + }, + "snowball": { + "name": "Snowball" + }, + "sns": { + "name": "SNS", + "cors": true + }, + "sqs": { + "name": "SQS", + "cors": true + }, + "ssm": { + "name": "SSM", + "cors": true + }, + "storagegateway": { + "name": "StorageGateway", + "cors": true + }, + "stepfunctions": { + "prefix": "states", + "name": "StepFunctions" + }, + "sts": { + "name": "STS", + "cors": true + }, + "support": { + "name": "Support" + }, + "swf": { + "name": "SWF" + }, + "xray": { + "name": "XRay" + }, + "waf": { + "name": "WAF", + "cors": true + }, + "wafregional": { + "prefix": "waf-regional", + "name": "WAFRegional" + }, + "workdocs": { + "name": "WorkDocs", + "cors": true + }, + "workspaces": { + "name": "WorkSpaces" + }, + "codestar": { + "name": "CodeStar" + }, + "lexmodelbuildingservice": { + "prefix": "lex-models", + "name": "LexModelBuildingService", + "cors": true + }, + "marketplaceentitlementservice": { + "prefix": "entitlement.marketplace", + "name": "MarketplaceEntitlementService" + }, + "athena": { + "name": "Athena" + }, + "greengrass": { + "name": "Greengrass" + }, + "dax": { + "name": "DAX" + }, + "migrationhub": { + "prefix": "AWSMigrationHub", + "name": "MigrationHub" + }, + "cloudhsmv2": { + "name": "CloudHSMV2" + }, + "glue": { + "name": "Glue" + }, + "mobile": { + "name": "Mobile" + }, + "pricing": { + "name": "Pricing", + "cors": true + }, + "costexplorer": { + "prefix": "ce", + "name": "CostExplorer", + "cors": true + }, + "mediaconvert": { + "name": "MediaConvert" + }, + "medialive": { + "name": "MediaLive" + }, + "mediapackage": { + "name": "MediaPackage" + }, + "mediastore": { + "name": "MediaStore" + }, + "mediastoredata": { + "prefix": "mediastore-data", + "name": "MediaStoreData", + "cors": true + }, + "appsync": { + "name": "AppSync" + }, + "guardduty": { + "name": "GuardDuty" + }, + "mq": { + "name": "MQ" + }, + "comprehend": { + "name": "Comprehend", + "cors": true + }, + "iotjobsdataplane": { + "prefix": "iot-jobs-data", + "name": "IoTJobsDataPlane" + }, + "kinesisvideoarchivedmedia": { + "prefix": "kinesis-video-archived-media", + "name": "KinesisVideoArchivedMedia", + "cors": true + }, + "kinesisvideomedia": { + "prefix": "kinesis-video-media", + "name": "KinesisVideoMedia", + "cors": true + }, + "kinesisvideo": { + "name": "KinesisVideo", + "cors": true + }, + "sagemakerruntime": { + "prefix": "runtime.sagemaker", + "name": "SageMakerRuntime" + }, + "sagemaker": { + "name": "SageMaker" + }, + "translate": { + "name": "Translate", + "cors": true + }, + "resourcegroups": { + "prefix": "resource-groups", + "name": "ResourceGroups", + "cors": true + }, + "alexaforbusiness": { + "name": "AlexaForBusiness" + }, + "cloud9": { + "name": "Cloud9" + }, + "serverlessapplicationrepository": { + "prefix": "serverlessrepo", + "name": "ServerlessApplicationRepository" + }, + "servicediscovery": { + "name": "ServiceDiscovery" + }, + "workmail": { + "name": "WorkMail" + }, + "autoscalingplans": { + "prefix": "autoscaling-plans", + "name": "AutoScalingPlans" + }, + "transcribeservice": { + "prefix": "transcribe", + "name": "TranscribeService" + }, + "connect": { + "name": "Connect" + }, + "acmpca": { + "prefix": "acm-pca", + "name": "ACMPCA" + }, + "fms": { + "name": "FMS" + }, + "secretsmanager": { + "name": "SecretsManager", + "cors": true + }, + "iotanalytics": { + "name": "IoTAnalytics" + }, + "iot1clickdevicesservice": { + "prefix": "iot1click-devices", + "name": "IoT1ClickDevicesService" + }, + "iot1clickprojects": { + "prefix": "iot1click-projects", + "name": "IoT1ClickProjects" + }, + "pi": { + "name": "PI" + }, + "neptune": { + "name": "Neptune" + }, + "mediatailor": { + "name": "MediaTailor" + }, + "eks": { + "name": "EKS" + }, + "macie": { + "name": "Macie" + }, + "dlm": { + "name": "DLM" + }, + "signer": { + "name": "Signer" + }, + "chime": { + "name": "Chime" + }, + "pinpointemail": { + "prefix": "pinpoint-email", + "name": "PinpointEmail" + }, + "ram": { + "name": "RAM" + }, + "route53resolver": { + "name": "Route53Resolver" + }, + "pinpointsmsvoice": { + "prefix": "sms-voice", + "name": "PinpointSMSVoice" + }, + "quicksight": { + "name": "QuickSight" + }, + "rdsdataservice": { + "prefix": "rds-data", + "name": "RDSDataService" + }, + "amplify": { + "name": "Amplify" + }, + "datasync": { + "name": "DataSync" + }, + "robomaker": { + "name": "RoboMaker" + }, + "transfer": { + "name": "Transfer" + }, + "globalaccelerator": { + "name": "GlobalAccelerator" + }, + "comprehendmedical": { + "name": "ComprehendMedical", + "cors": true + }, + "kinesisanalyticsv2": { + "name": "KinesisAnalyticsV2" + }, + "mediaconnect": { + "name": "MediaConnect" + }, + "fsx": { + "name": "FSx" + }, + "securityhub": { + "name": "SecurityHub" + }, + "appmesh": { + "name": "AppMesh", + "versions": [ + "2018-10-01*" + ] + }, + "licensemanager": { + "prefix": "license-manager", + "name": "LicenseManager" + }, + "kafka": { + "name": "Kafka" + }, + "apigatewaymanagementapi": { + "name": "ApiGatewayManagementApi" + }, + "apigatewayv2": { + "name": "ApiGatewayV2" + }, + "docdb": { + "name": "DocDB" + }, + "backup": { + "name": "Backup" + }, + "worklink": { + "name": "WorkLink" + }, + "textract": { + "name": "Textract" + }, + "managedblockchain": { + "name": "ManagedBlockchain" + }, + "mediapackagevod": { + "prefix": "mediapackage-vod", + "name": "MediaPackageVod" + }, + "groundstation": { + "name": "GroundStation" + }, + "iotthingsgraph": { + "name": "IoTThingsGraph" + }, + "iotevents": { + "name": "IoTEvents" + }, + "ioteventsdata": { + "prefix": "iotevents-data", + "name": "IoTEventsData" + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/custom-resources/package-lock.json b/packages/@aws-cdk/custom-resources/package-lock.json new file mode 100644 index 0000000000000..c375dfec4cf92 --- /dev/null +++ b/packages/@aws-cdk/custom-resources/package-lock.json @@ -0,0 +1,416 @@ +{ + "name": "@aws-cdk/custom-resources", + "version": "0.35.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@sinonjs/commons": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.4.0.tgz", + "integrity": "sha512-9jHK3YF/8HtJ9wCAbG+j8cD0i0+ATS9A7gXFqS36TblLPNy6rEEc+SB0imo91eCboGaBYGV/MT1/br/J+EE7Tw==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + }, + "@sinonjs/formatio": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-3.2.1.tgz", + "integrity": "sha512-tsHvOB24rvyvV2+zKMmPkZ7dXX6LSLKZ7aOtXY6Edklp0uRcgGpOsQTTGTcWViFyx4uhWc6GV8QdnALbIbIdeQ==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1", + "@sinonjs/samsam": "^3.1.0" + } + }, + "@sinonjs/samsam": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-3.3.1.tgz", + "integrity": "sha512-wRSfmyd81swH0hA1bxJZJ57xr22kC07a1N4zuIL47yTS04bDk6AoCkczcqHEjcRPmJ+FruGJ9WBQiJwMtIElFw==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.0.2", + "array-from": "^2.1.1", + "lodash": "^4.17.11" + } + }, + "@sinonjs/text-encoding": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", + "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", + "dev": true + }, + "@types/aws-lambda": { + "version": "8.10.27", + "resolved": "https://registry.npmjs.org/@types/aws-lambda/-/aws-lambda-8.10.27.tgz", + "integrity": "sha512-9QjcjORRtgG5KPVHWqGZ0F2Uo/ALUWQ5D7qfJEco0fEjoSbA908w05RXql7YPS72jQ1w6I+pr+8pQPqBPlYnSw==", + "dev": true + }, + "@types/nock": { + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/@types/nock/-/nock-10.0.3.tgz", + "integrity": "sha512-OthuN+2FuzfZO3yONJ/QVjKmLEuRagS9TV9lEId+WHL9KhftYG+/2z+pxlr0UgVVXSpVD8woie/3fzQn8ft/Ow==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/node": { + "version": "12.0.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.5.tgz", + "integrity": "sha512-CFLSALoE+93+Hcb5pFjp0J1uMrrbLRe+L1+gFwerJ776R3TACSF0kTVRQ7AvRa7aFx70nqYHAc7wQPlt9kY2Mg==", + "dev": true + }, + "@types/sinon": { + "version": "7.0.13", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-7.0.13.tgz", + "integrity": "sha512-d7c/C/+H/knZ3L8/cxhicHUiTDxdgap0b/aNJfsmLwFu/iOP17mdgbQsbHA3SJmrzsjD0l3UEE5SN4xxuz5ung==", + "dev": true + }, + "array-from": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/array-from/-/array-from-2.1.1.tgz", + "integrity": "sha1-z+nYwmYoudxa7MYqn12PHzUsEZU=", + "dev": true + }, + "assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true + }, + "aws-sdk": { + "version": "2.469.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.469.0.tgz", + "integrity": "sha512-VaIrO3aBX83gKkBPk9xM0RHmu7fmq76kaF0SqbsWlPImgxc5foJ4rBlRMMlmeNogFZZ/XTQdI+gkFDVosV14Ig==", + "dev": true, + "requires": { + "buffer": "4.9.1", + "events": "1.1.1", + "ieee754": "1.1.8", + "jmespath": "0.15.0", + "querystring": "0.2.0", + "sax": "1.2.1", + "url": "0.10.3", + "uuid": "3.3.2", + "xml2js": "0.4.19" + } + }, + "aws-sdk-mock": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/aws-sdk-mock/-/aws-sdk-mock-4.4.0.tgz", + "integrity": "sha512-cnR2Sff2jSO2UazeGL3rp4ulg66I8mVeCWvKZk0Bb+s//b5sUDZ1OhvOqr7v6uRJKhgaikeZJdZtI6efHYsN2Q==", + "dev": true, + "requires": { + "aws-sdk": "^2.431.0", + "sinon": "^7.3.1", + "traverse": "^0.6.6" + } + }, + "base64-js": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", + "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", + "dev": true + }, + "buffer": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", + "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", + "dev": true, + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "chai": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", + "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==", + "dev": true, + "requires": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "pathval": "^1.1.0", + "type-detect": "^4.0.5" + } + }, + "check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "dev": true + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "dev": true, + "requires": { + "type-detect": "^4.0.0" + } + }, + "deep-equal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", + "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=", + "dev": true + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "events": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", + "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", + "dev": true + }, + "get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "ieee754": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz", + "integrity": "sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q=", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "jmespath": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz", + "integrity": "sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc=", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "just-extend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.0.2.tgz", + "integrity": "sha512-FrLwOgm+iXrPV+5zDU6Jqu4gCRXbWEQg2O3SKONsWE4w7AXFRkryS53bpWdaL9cNol+AmR3AEYz6kn+o0fCPnw==", + "dev": true + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + }, + "lolex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-4.1.0.tgz", + "integrity": "sha512-BYxIEXiVq5lGIXeVHnsFzqa1TxN5acnKnPCdlZSpzm8viNEOhiigupA4vTQ9HEFQ6nLTQ9wQOgBknJgzUYQ9Aw==", + "dev": true + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "nise": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/nise/-/nise-1.5.0.tgz", + "integrity": "sha512-Z3sfYEkLFzFmL8KY6xnSJLRxwQwYBjOXi/24lb62ZnZiGA0JUzGGTI6TBIgfCSMIDl9Jlu8SRmHNACLTemDHww==", + "dev": true, + "requires": { + "@sinonjs/formatio": "^3.1.0", + "@sinonjs/text-encoding": "^0.7.1", + "just-extend": "^4.0.2", + "lolex": "^4.1.0", + "path-to-regexp": "^1.7.0" + } + }, + "nock": { + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/nock/-/nock-10.0.6.tgz", + "integrity": "sha512-b47OWj1qf/LqSQYnmokNWM8D88KvUl2y7jT0567NB3ZBAZFz2bWp2PC81Xn7u8F2/vJxzkzNZybnemeFa7AZ2w==", + "dev": true, + "requires": { + "chai": "^4.1.2", + "debug": "^4.1.0", + "deep-equal": "^1.0.0", + "json-stringify-safe": "^5.0.1", + "lodash": "^4.17.5", + "mkdirp": "^0.5.0", + "propagate": "^1.0.0", + "qs": "^6.5.1", + "semver": "^5.5.0" + } + }, + "path-to-regexp": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", + "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", + "dev": true, + "requires": { + "isarray": "0.0.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + } + } + }, + "pathval": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", + "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", + "dev": true + }, + "propagate": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/propagate/-/propagate-1.0.0.tgz", + "integrity": "sha1-AMLa7t2iDofjeCs0Stuhzd1q1wk=", + "dev": true + }, + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + }, + "qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", + "dev": true + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "dev": true + }, + "sax": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz", + "integrity": "sha1-e45lYZCyKOgaZq6nSEgNgozS03o=", + "dev": true + }, + "semver": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", + "dev": true + }, + "sinon": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-7.3.2.tgz", + "integrity": "sha512-thErC1z64BeyGiPvF8aoSg0LEnptSaWE7YhdWWbWXgelOyThent7uKOnnEh9zBxDbKixtr5dEko+ws1sZMuFMA==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.4.0", + "@sinonjs/formatio": "^3.2.1", + "@sinonjs/samsam": "^3.3.1", + "diff": "^3.5.0", + "lolex": "^4.0.1", + "nise": "^1.4.10", + "supports-color": "^5.5.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "traverse": { + "version": "0.6.6", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz", + "integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=", + "dev": true + }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + }, + "url": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", + "integrity": "sha1-Ah5NnHcF8hu/N9A861h2dAJ3TGQ=", + "dev": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + } + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "dev": true + }, + "xml2js": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", + "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", + "dev": true, + "requires": { + "sax": ">=0.6.0", + "xmlbuilder": "~9.0.1" + } + }, + "xmlbuilder": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", + "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=", + "dev": true + } + } +} diff --git a/packages/@aws-cdk/custom-resources/package.json b/packages/@aws-cdk/custom-resources/package.json new file mode 100644 index 0000000000000..64c5b774c7df3 --- /dev/null +++ b/packages/@aws-cdk/custom-resources/package.json @@ -0,0 +1,106 @@ +{ + "name": "@aws-cdk/custom-resources", + "version": "0.35.0", + "description": "Constructs for implementing CDK custom resources", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "jsii": { + "outdir": "dist", + "targets": { + "java": { + "package": "software.amazon.awscdk.customresources", + "maven": { + "groupId": "software.amazon.awscdk", + "artifactId": "cdk-customresources" + } + }, + "dotnet": { + "namespace": "Amazon.CDK.CustomResources", + "packageId": "Amazon.CDK.AWS.CustomResources", + "signAssembly": true, + "assemblyOriginatorKeyFile": "../../key.snk" + }, + "python": { + "distName": "aws-cdk.custom-resources", + "module": "aws_cdk.custom_resources" + } + } + }, + "repository": { + "type": "git", + "url": "https://github.com/awslabs/aws-cdk.git", + "directory": "packages/@aws-cdk/custom-resources" + }, + "scripts": { + "build": "cdk-build", + "watch": "cdk-watch", + "lint": "cdk-lint", + "test": "cdk-test", + "integ": "cdk-integ", + "pkglint": "pkglint -f", + "package": "cdk-package", + "awslint": "cdk-awslint", + "cfn2ts": "cfn2ts", + "build+test+package": "npm run build+test && npm run package", + "build+test": "npm run build && npm test" + }, + "cdk-build": { + "pre": [ + "cp -f node_modules/aws-sdk/apis/metadata.json lib/sdk-api-metadata.json" + ] + }, + "keywords": [ + "aws", + "cdk", + "constructs", + "cloudformation", + "custom-resources", + "customresources" + ], + "author": { + "name": "Amazon Web Services", + "url": "https://aws.amazon.com", + "organization": true + }, + "license": "Apache-2.0", + "devDependencies": { + "@aws-cdk/assert": "^0.35.0", + "@aws-cdk/aws-events": "^0.35.0", + "@aws-cdk/aws-ssm": "^0.35.0", + "@types/aws-lambda": "^8.10.27", + "@types/nock": "^10.0.3", + "@types/sinon": "^7.0.13", + "aws-sdk-mock": "^4.4.0", + "cdk-build-tools": "^0.35.0", + "cdk-integ-tools": "^0.35.0", + "cfn2ts": "^0.35.0", + "nock": "^10.0.6", + "aws-sdk": "^2.437.0", + "pkglint": "^0.35.0", + "sinon": "^7.3.2" + }, + "dependencies": { + "@aws-cdk/aws-iam": "^0.35.0", + "@aws-cdk/aws-lambda": "^0.35.0", + "@aws-cdk/aws-cloudformation": "^0.35.0", + "@aws-cdk/aws-sns": "^0.35.0", + "@aws-cdk/core": "^0.35.0" + }, + "homepage": "https://github.com/awslabs/aws-cdk", + "peerDependencies": { + "@aws-cdk/aws-iam": "^0.35.0", + "@aws-cdk/aws-cloudformation": "^0.35.0", + "@aws-cdk/aws-lambda": "^0.35.0", + "@aws-cdk/aws-sns": "^0.35.0", + "@aws-cdk/core": "^0.35.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "stability": "experimental", + "awslint": { + "exclude": [ + "construct-ctor-props-optional:@aws-cdk/custom-resources.AwsCustomResource" + ] + } +} diff --git a/packages/@aws-cdk/aws-cloudformation/test/integ.aws-custom-resource.expected.json b/packages/@aws-cdk/custom-resources/test/integ.aws-custom-resource.expected.json similarity index 100% rename from packages/@aws-cdk/aws-cloudformation/test/integ.aws-custom-resource.expected.json rename to packages/@aws-cdk/custom-resources/test/integ.aws-custom-resource.expected.json diff --git a/packages/@aws-cdk/aws-cloudformation/test/integ.aws-custom-resource.ts b/packages/@aws-cdk/custom-resources/test/integ.aws-custom-resource.ts similarity index 100% rename from packages/@aws-cdk/aws-cloudformation/test/integ.aws-custom-resource.ts rename to packages/@aws-cdk/custom-resources/test/integ.aws-custom-resource.ts diff --git a/packages/@aws-cdk/aws-cloudformation/test/test.aws-custom-resource-provider.ts b/packages/@aws-cdk/custom-resources/test/test.aws-custom-resource-provider.ts similarity index 100% rename from packages/@aws-cdk/aws-cloudformation/test/test.aws-custom-resource-provider.ts rename to packages/@aws-cdk/custom-resources/test/test.aws-custom-resource-provider.ts diff --git a/packages/@aws-cdk/aws-cloudformation/test/test.aws-custom-resource.ts b/packages/@aws-cdk/custom-resources/test/test.aws-custom-resource.ts similarity index 100% rename from packages/@aws-cdk/aws-cloudformation/test/test.aws-custom-resource.ts rename to packages/@aws-cdk/custom-resources/test/test.aws-custom-resource.ts diff --git a/packages/decdk/package.json b/packages/decdk/package.json index ce7e6700ed2d9..8e1f0d8119f72 100644 --- a/packages/decdk/package.json +++ b/packages/decdk/package.json @@ -143,7 +143,8 @@ "jsii-reflect": "^0.11.3", "jsonschema": "^1.2.4", "yaml": "1.6.0", - "yargs": "^13.2.4" + "yargs": "^13.2.4", + "@aws-cdk/custom-resources": "^0.35.0" }, "devDependencies": { "@types/fs-extra": "^7.0.0",