@aws-solutions-constructs/aws-lambda-kinesisstreams 2.51.0 → 2.52.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +2 -0
- package/.jsii +49 -4
- package/integ.config.json +7 -0
- package/lib/index.js +1 -1
- package/package.json +9 -8
- package/test/integ.lamkin-existingLambda.js +5 -2
- package/test/integ.lamkin-existingLambda.js.snapshot/asset.c7dc0cc1b24bda1d2a5345f61897eee32184906649fdb1de93853c512e129dbf/index.mjs +15 -0
- package/test/integ.lamkin-existingLambda.js.snapshot/cdk.out +1 -0
- package/test/integ.lamkin-existingLambda.js.snapshot/integ.json +12 -0
- package/test/integ.lamkin-existingLambda.js.snapshot/lamkin-existingLambda.assets.json +32 -0
- package/test/integ.lamkin-existingLambda.js.snapshot/lamkin-existingLambda.template.json +229 -0
- package/test/integ.lamkin-existingLambda.js.snapshot/lamkinexistingLambdaIntegDefaultTestDeployAssertD62E9419.assets.json +19 -0
- package/test/integ.lamkin-existingLambda.js.snapshot/lamkinexistingLambdaIntegDefaultTestDeployAssertD62E9419.template.json +36 -0
- package/test/integ.lamkin-existingLambda.js.snapshot/manifest.json +143 -0
- package/test/integ.lamkin-existingLambda.js.snapshot/tree.json +412 -0
- package/test/integ.lamkin-existingStream.js +5 -2
- package/test/integ.lamkin-existingStream.js.snapshot/asset.c7dc0cc1b24bda1d2a5345f61897eee32184906649fdb1de93853c512e129dbf/index.mjs +15 -0
- package/test/integ.lamkin-existingStream.js.snapshot/cdk.out +1 -0
- package/test/integ.lamkin-existingStream.js.snapshot/integ.json +12 -0
- package/test/integ.lamkin-existingStream.js.snapshot/lamkin-existingStream.assets.json +32 -0
- package/test/integ.lamkin-existingStream.js.snapshot/lamkin-existingStream.template.json +231 -0
- package/test/integ.lamkin-existingStream.js.snapshot/lamkinexistingStreamIntegDefaultTestDeployAssert2681B9A2.assets.json +19 -0
- package/test/integ.lamkin-existingStream.js.snapshot/lamkinexistingStreamIntegDefaultTestDeployAssert2681B9A2.template.json +36 -0
- package/test/integ.lamkin-existingStream.js.snapshot/manifest.json +143 -0
- package/test/integ.lamkin-existingStream.js.snapshot/tree.json +414 -0
- package/test/integ.lamkin-existingStreamWithCmk.js +5 -2
- package/test/integ.lamkin-existingStreamWithCmk.js.snapshot/asset.c7dc0cc1b24bda1d2a5345f61897eee32184906649fdb1de93853c512e129dbf/index.mjs +15 -0
- package/test/integ.lamkin-existingStreamWithCmk.js.snapshot/cdk.out +1 -0
- package/test/integ.lamkin-existingStreamWithCmk.js.snapshot/integ.json +12 -0
- package/test/integ.lamkin-existingStreamWithCmk.js.snapshot/lamkin-existingStreamWithCmk.assets.json +32 -0
- package/test/integ.lamkin-existingStreamWithCmk.js.snapshot/lamkin-existingStreamWithCmk.template.json +285 -0
- package/test/integ.lamkin-existingStreamWithCmk.js.snapshot/lamkinexistingStreamWithCmkIntegDefaultTestDeployAssert6EDF4045.assets.json +19 -0
- package/test/integ.lamkin-existingStreamWithCmk.js.snapshot/lamkinexistingStreamWithCmkIntegDefaultTestDeployAssert6EDF4045.template.json +36 -0
- package/test/integ.lamkin-existingStreamWithCmk.js.snapshot/manifest.json +149 -0
- package/test/integ.lamkin-existingStreamWithCmk.js.snapshot/tree.json +484 -0
- package/test/integ.lamkin-existingVpc.js +6 -2
- package/test/integ.lamkin-existingVpc.js.snapshot/asset.c7dc0cc1b24bda1d2a5345f61897eee32184906649fdb1de93853c512e129dbf/index.mjs +15 -0
- package/test/integ.lamkin-existingVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +1 -0
- package/test/integ.lamkin-existingVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js +1 -0
- package/test/integ.lamkin-existingVpc.js.snapshot/cdk.out +1 -0
- package/test/integ.lamkin-existingVpc.js.snapshot/integ.json +12 -0
- package/test/integ.lamkin-existingVpc.js.snapshot/lamkin-existingVpc.assets.json +45 -0
- package/test/integ.lamkin-existingVpc.js.snapshot/lamkin-existingVpc.template.json +1040 -0
- package/test/integ.lamkin-existingVpc.js.snapshot/lamkinexistingVpcIntegDefaultTestDeployAssertB97E47BA.assets.json +19 -0
- package/test/integ.lamkin-existingVpc.js.snapshot/lamkinexistingVpcIntegDefaultTestDeployAssertB97E47BA.template.json +36 -0
- package/test/integ.lamkin-existingVpc.js.snapshot/manifest.json +341 -0
- package/test/integ.lamkin-existingVpc.js.snapshot/tree.json +1463 -0
- package/test/integ.lamkin-newStreamFromProps.js +5 -2
- package/test/integ.lamkin-newStreamFromProps.js.snapshot/asset.c7dc0cc1b24bda1d2a5345f61897eee32184906649fdb1de93853c512e129dbf/index.mjs +15 -0
- package/test/integ.lamkin-newStreamFromProps.js.snapshot/cdk.out +1 -0
- package/test/integ.lamkin-newStreamFromProps.js.snapshot/integ.json +12 -0
- package/test/integ.lamkin-newStreamFromProps.js.snapshot/lamkin-newStreamFromProps.assets.json +32 -0
- package/test/integ.lamkin-newStreamFromProps.js.snapshot/lamkin-newStreamFromProps.template.json +231 -0
- package/test/integ.lamkin-newStreamFromProps.js.snapshot/lamkinnewStreamFromPropsIntegDefaultTestDeployAssertC2946F34.assets.json +19 -0
- package/test/integ.lamkin-newStreamFromProps.js.snapshot/lamkinnewStreamFromPropsIntegDefaultTestDeployAssertC2946F34.template.json +36 -0
- package/test/integ.lamkin-newStreamFromProps.js.snapshot/manifest.json +143 -0
- package/test/integ.lamkin-newStreamFromProps.js.snapshot/tree.json +414 -0
- package/test/integ.lamkin-newVpc.js +6 -2
- package/test/integ.lamkin-newVpc.js.snapshot/asset.c7dc0cc1b24bda1d2a5345f61897eee32184906649fdb1de93853c512e129dbf/index.mjs +15 -0
- package/test/integ.lamkin-newVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +1 -0
- package/test/integ.lamkin-newVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js +1 -0
- package/test/integ.lamkin-newVpc.js.snapshot/cdk.out +1 -0
- package/test/integ.lamkin-newVpc.js.snapshot/integ.json +12 -0
- package/test/integ.lamkin-newVpc.js.snapshot/lamkin-newVpc.assets.json +45 -0
- package/test/integ.lamkin-newVpc.js.snapshot/lamkin-newVpc.template.json +756 -0
- package/test/integ.lamkin-newVpc.js.snapshot/lamkinnewVpcIntegDefaultTestDeployAssert16AC3D59.assets.json +19 -0
- package/test/integ.lamkin-newVpc.js.snapshot/lamkinnewVpcIntegDefaultTestDeployAssert16AC3D59.template.json +36 -0
- package/test/integ.lamkin-newVpc.js.snapshot/manifest.json +245 -0
- package/test/integ.lamkin-newVpc.js.snapshot/tree.json +1051 -0
- package/test/integ.lamkin-newVpcFromProps.js +6 -2
- package/test/integ.lamkin-newVpcFromProps.js.snapshot/asset.c7dc0cc1b24bda1d2a5345f61897eee32184906649fdb1de93853c512e129dbf/index.mjs +15 -0
- package/test/integ.lamkin-newVpcFromProps.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +1 -0
- package/test/integ.lamkin-newVpcFromProps.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js +1 -0
- package/test/integ.lamkin-newVpcFromProps.js.snapshot/cdk.out +1 -0
- package/test/integ.lamkin-newVpcFromProps.js.snapshot/integ.json +12 -0
- package/test/integ.lamkin-newVpcFromProps.js.snapshot/lamkin-newVpcFromProps.assets.json +45 -0
- package/test/integ.lamkin-newVpcFromProps.js.snapshot/lamkin-newVpcFromProps.template.json +692 -0
- package/test/integ.lamkin-newVpcFromProps.js.snapshot/lamkinnewVpcFromPropsIntegDefaultTestDeployAssert95FE0487.assets.json +19 -0
- package/test/integ.lamkin-newVpcFromProps.js.snapshot/lamkinnewVpcFromPropsIntegDefaultTestDeployAssert95FE0487.template.json +36 -0
- package/test/integ.lamkin-newVpcFromProps.js.snapshot/manifest.json +227 -0
- package/test/integ.lamkin-newVpcFromProps.js.snapshot/tree.json +946 -0
- package/test/integ.lamkin-noArguments.js +5 -2
- package/test/integ.lamkin-noArguments.js.snapshot/asset.c7dc0cc1b24bda1d2a5345f61897eee32184906649fdb1de93853c512e129dbf/index.mjs +15 -0
- package/test/integ.lamkin-noArguments.js.snapshot/cdk.out +1 -0
- package/test/integ.lamkin-noArguments.js.snapshot/integ.json +12 -0
- package/test/integ.lamkin-noArguments.js.snapshot/lamkin-noArguments.assets.json +32 -0
- package/test/integ.lamkin-noArguments.js.snapshot/lamkin-noArguments.template.json +229 -0
- package/test/integ.lamkin-noArguments.js.snapshot/lamkinnoArgumentsIntegDefaultTestDeployAssertC0CED4B2.assets.json +19 -0
- package/test/integ.lamkin-noArguments.js.snapshot/lamkinnoArgumentsIntegDefaultTestDeployAssertC0CED4B2.template.json +36 -0
- package/test/integ.lamkin-noArguments.js.snapshot/manifest.json +143 -0
- package/test/integ.lamkin-noArguments.js.snapshot/tree.json +412 -0
- package/test/integ.lamkin-existingLambda.expected.json +0 -229
- package/test/integ.lamkin-existingStream.expected.json +0 -231
- package/test/integ.lamkin-existingStreamWithCmk.expected.json +0 -297
- package/test/integ.lamkin-existingVpc.expected.json +0 -1065
- package/test/integ.lamkin-newStreamFromProps.expected.json +0 -231
- package/test/integ.lamkin-newVpc.expected.json +0 -671
- package/test/integ.lamkin-newVpcFromProps.expected.json +0 -557
- package/test/integ.lamkin-noArguments.expected.json +0 -229
|
@@ -16,6 +16,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
16
16
|
const aws_cdk_lib_1 = require("aws-cdk-lib");
|
|
17
17
|
const lib_1 = require("../lib");
|
|
18
18
|
const core_1 = require("@aws-solutions-constructs/core");
|
|
19
|
+
const integ_tests_alpha_1 = require("@aws-cdk/integ-tests-alpha");
|
|
19
20
|
const lambda = require("aws-cdk-lib/aws-lambda");
|
|
20
21
|
const app = new aws_cdk_lib_1.App();
|
|
21
22
|
const stack = new aws_cdk_lib_1.Stack(app, core_1.generateIntegStackName(__filename));
|
|
@@ -30,5 +31,8 @@ new lib_1.LambdaToKinesisStreams(stack, 'test-lambda-kinesisstreams', {
|
|
|
30
31
|
},
|
|
31
32
|
deployVpc: true
|
|
32
33
|
});
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
core_1.suppressCustomHandlerCfnNagWarnings(stack, 'Custom::VpcRestrictDefaultSGCustomResourceProvider');
|
|
35
|
+
new integ_tests_alpha_1.IntegTest(stack, 'Integ', { testCases: [
|
|
36
|
+
stack
|
|
37
|
+
] });
|
|
38
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZWcubGFta2luLW5ld1ZwY0Zyb21Qcm9wcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImludGVnLmxhbWtpbi1uZXdWcGNGcm9tUHJvcHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7OztHQVdHOztBQUVILGdCQUFnQjtBQUNoQiw2Q0FBeUM7QUFDekMsZ0NBQWdEO0FBQ2hELHlEQUE2RztBQUM3RyxrRUFBdUQ7QUFDdkQsaURBQWlEO0FBRWpELE1BQU0sR0FBRyxHQUFHLElBQUksaUJBQUcsRUFBRSxDQUFDO0FBQ3RCLE1BQU0sS0FBSyxHQUFHLElBQUksbUJBQUssQ0FBQyxHQUFHLEVBQUUsNkJBQXNCLENBQUMsVUFBVSxDQUFDLENBQUMsQ0FBQztBQUVqRSxJQUFJLDRCQUFzQixDQUFDLEtBQUssRUFBRSw0QkFBNEIsRUFBRTtJQUM5RCxtQkFBbUIsRUFBRTtRQUNuQixJQUFJLEVBQUUsTUFBTSxDQUFDLElBQUksQ0FBQyxTQUFTLENBQUMsR0FBRyxTQUFTLFNBQVMsQ0FBQztRQUNsRCxPQUFPLEVBQUU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bG95VnBjOiB0cnVlXG59KTtcblxuc3VwcHJlc3NDdXN0b21IYW5kbGVyQ2ZuTmFnV2FybmluZ3Moc3RhY2ssICdDdXN0b206OlZwY1Jlc3RyaWN0RGVmYXVsdFNHQ3VzdG9tUmVzb3VyY2VQcm92aWRlcicpO1xuXG5uZXcgSW50ZWdUZXN0KHN0YWNrLCAnSW50ZWcnLCB7IHRlc3RDYXNlczogW1xuICBzdGFja1xuXSB9KTtcbiJdfQ==
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { KinesisClient, PutRecordCommand } from "@aws-sdk/client-kinesis";
|
|
2
|
+
|
|
3
|
+
const kinesis = new KinesisClient({ region: process.env.REGION });
|
|
4
|
+
const streamName = process.env.KINESIS_DATASTREAM_NAME;
|
|
5
|
+
|
|
6
|
+
export const handler = async(event) => {
|
|
7
|
+
|
|
8
|
+
const result = await kinesis.send(new PutRecordCommand({
|
|
9
|
+
StreamName: streamName,
|
|
10
|
+
Data: Buffer.from('hello from solutions constructs'),
|
|
11
|
+
PartitionKey: '1'
|
|
12
|
+
}));
|
|
13
|
+
|
|
14
|
+
console.log(JSON.stringify(result));
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)try{return await fn(...xs)}catch(e){if(attempts--<=0)throw e;await sleep(Math.floor(Math.random()*ms)),ms*=2}}}exports.withRetries=withRetries;async function sleep(ms){return new Promise(ok=>setTimeout(ok,ms))}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var I=Object.create,t=Object.defineProperty,y=Object.getOwnPropertyDescriptor,P=Object.getOwnPropertyNames,g=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,G=(r,e)=>{for(var o in e)t(r,o,{get:e[o],enumerable:!0})},n=(r,e,o,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of P(e))!l.call(r,s)&&s!==o&&t(r,s,{get:()=>e[s],enumerable:!(i=y(e,s))||i.enumerable});return r},R=(r,e,o)=>(o=r!=null?I(g(r)):{},n(e||!r||!r.__esModule?t(o,"default",{value:r,enumerable:!0}):o,r)),S=r=>n(t({},"__esModule",{value:!0}),r),k={};G(k,{handler:()=>f}),module.exports=S(k);var a=R(require("@aws-sdk/client-ec2")),u=new a.EC2({});function c(r,e){return{GroupId:r,IpPermissions:[{UserIdGroupPairs:[{GroupId:r,UserId:e}],IpProtocol:"-1"}]}}function d(r){return{GroupId:r,IpPermissions:[{IpRanges:[{CidrIp:"0.0.0.0/0"}],IpProtocol:"-1"}]}}async function f(r){let e=r.ResourceProperties.DefaultSecurityGroupId,o=r.ResourceProperties.Account;switch(r.RequestType){case"Create":return p(e,o);case"Update":return h(r);case"Delete":return m(e,o)}}async function h(r){let e=r.OldResourceProperties.DefaultSecurityGroupId,o=r.ResourceProperties.DefaultSecurityGroupId;e!==o&&(await m(e,r.ResourceProperties.Account),await p(o,r.ResourceProperties.Account))}async function p(r,e){try{await u.revokeSecurityGroupEgress(d(r))}catch(o){if(o.name!=="InvalidPermission.NotFound")throw o}try{await u.revokeSecurityGroupIngress(c(r,e))}catch(o){if(o.name!=="InvalidPermission.NotFound")throw o}}async function m(r,e){await u.authorizeSecurityGroupIngress(c(r,e)),await u.authorizeSecurityGroupEgress(d(r))}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":"36.0.0"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "36.0.0",
|
|
3
|
+
"testCases": {
|
|
4
|
+
"lamkin-newVpcFromProps/Integ/DefaultTest": {
|
|
5
|
+
"stacks": [
|
|
6
|
+
"lamkin-newVpcFromProps"
|
|
7
|
+
],
|
|
8
|
+
"assertionStack": "lamkin-newVpcFromProps/Integ/DefaultTest/DeployAssert",
|
|
9
|
+
"assertionStackName": "lamkinnewVpcFromPropsIntegDefaultTestDeployAssert95FE0487"
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "36.0.0",
|
|
3
|
+
"files": {
|
|
4
|
+
"dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": {
|
|
5
|
+
"source": {
|
|
6
|
+
"path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e",
|
|
7
|
+
"packaging": "zip"
|
|
8
|
+
},
|
|
9
|
+
"destinations": {
|
|
10
|
+
"current_account-current_region": {
|
|
11
|
+
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
|
|
12
|
+
"objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip",
|
|
13
|
+
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"c7dc0cc1b24bda1d2a5345f61897eee32184906649fdb1de93853c512e129dbf": {
|
|
18
|
+
"source": {
|
|
19
|
+
"path": "asset.c7dc0cc1b24bda1d2a5345f61897eee32184906649fdb1de93853c512e129dbf",
|
|
20
|
+
"packaging": "zip"
|
|
21
|
+
},
|
|
22
|
+
"destinations": {
|
|
23
|
+
"current_account-current_region": {
|
|
24
|
+
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
|
|
25
|
+
"objectKey": "c7dc0cc1b24bda1d2a5345f61897eee32184906649fdb1de93853c512e129dbf.zip",
|
|
26
|
+
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"5982d21e6c82d3a79e68ab39e4deb56e6559e818af5eacbbe4d11b2dcc5460b3": {
|
|
31
|
+
"source": {
|
|
32
|
+
"path": "lamkin-newVpcFromProps.template.json",
|
|
33
|
+
"packaging": "file"
|
|
34
|
+
},
|
|
35
|
+
"destinations": {
|
|
36
|
+
"current_account-current_region": {
|
|
37
|
+
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
|
|
38
|
+
"objectKey": "5982d21e6c82d3a79e68ab39e4deb56e6559e818af5eacbbe4d11b2dcc5460b3.json",
|
|
39
|
+
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"dockerImages": {}
|
|
45
|
+
}
|