File tree Expand file tree Collapse file tree
packages/cdk-blue-green-container-deployment/src/lambdas/ecs-deployment-group Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -117,15 +117,15 @@ export const handleCreate: OnCreateHandler = async (event, context): Promise<Res
117117 return {
118118 physicalResourceId : deploymentGroupName ,
119119 responseData : {
120- Arn : arnForDeploymentGroup ( applicationName , deploymentGroupName , extractArnParts ( context . invokedFunctionArn ) )
120+ Arn : arnForDeploymentGroup ( applicationName , deploymentGroupName , context . invokedFunctionArn )
121121 } ,
122122 } ;
123123} ;
124124
125125export const handleUpdate : OnUpdateHandler = async ( event , context ) : Promise < ResourceHandlerReturn > => {
126126 const newProps = getProperties ( event . ResourceProperties ) ;
127127 const oldProps = getProperties ( event . OldResourceProperties ) ;
128- const deploymentGroupArn = arnForDeploymentGroup ( newProps . applicationName , newProps . deploymentGroupName , extractArnParts ( context . invokedFunctionArn ) ) ;
128+ const deploymentGroupArn = arnForDeploymentGroup ( newProps . applicationName , newProps . deploymentGroupName , context . invokedFunctionArn ) ;
129129
130130 await codeDeploy
131131 . updateDeploymentGroup ( {
@@ -217,7 +217,8 @@ const extractArnParts = (invokedFunctionArn: string): ArnParts => {
217217 }
218218}
219219
220- const arnForDeploymentGroup = ( applicationName : string , deploymentGroupName : string , arnParts : ArnParts ) : string => {
220+ const arnForDeploymentGroup = ( applicationName : string , deploymentGroupName : string , invokedFunctionArn : string ) : string => {
221+ const arnParts = extractArnParts ( invokedFunctionArn ) ;
221222 return `arn:${ arnParts . awsPartition } :codedeploy:${ arnParts . awsRegion } :${ arnParts . awsAccountId } :deploymentgroup:${ applicationName } /${ deploymentGroupName } `
222223}
223224
You can’t perform that action at this time.
0 commit comments