Skip to content

Commit a07f688

Browse files
committed
[sdlf-stage-glue] remove pStageName parameter
pPipeline and pStageName, and pDeploymentInstance have a similar purpose
1 parent fde1dcb commit a07f688

File tree

1 file changed

+11
-16
lines changed

1 file changed

+11
-16
lines changed

sdlf-stage-glue/src/glue.yaml

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Parameters:
1111
Type: String
1212
Description: A string uniquely identifying this deployment in this AWS account
1313
Default: glue
14+
AllowedPattern: "[a-zA-Z0-9\\-]{1,20}"
1415
pDatasetDeploymentInstance:
1516
Type: String
1617
Description: The string uniquely identifying a sdlf-dataset deployment in this AWS account
@@ -59,10 +60,6 @@ Parameters:
5960
Description: The name of the dataset (all lowercase, no symbols or spaces)
6061
Type: String
6162
AllowedPattern: "[a-z0-9]{2,14}"
62-
pStageName:
63-
Description: Name of the stage (all lowercase, hyphen allowed, no other symbols or spaces)
64-
Type: String
65-
AllowedPattern: "[a-zA-Z0-9\\-]{1,12}"
6663
pStageEnabled:
6764
Description: Whether the stage is enabled or not
6865
Type: String
@@ -162,7 +159,6 @@ Globals:
162159
Environment:
163160
Variables:
164161
DATASET: !Ref pDataset
165-
PIPELINE_STAGE: !Ref pStageName
166162
DEPLOYMENT_INSTANCE: !Ref pDeploymentInstance
167163
STORAGE_DEPLOYMENT_INSTANCE: !Ref pStorageDeploymentInstance
168164
DATASET_DEPLOYMENT_INSTANCE: !Ref pDatasetDeploymentInstance
@@ -187,7 +183,6 @@ Resources:
187183
pEventBus: !Ref pEventBus
188184
pScheduleGroup: !Ref pScheduleGroup
189185
pDataset: !Ref pDataset
190-
pStageName: !Ref pStageName
191186
pStageEnabled: !Ref pStageEnabled
192187
pTriggerType: !Ref pTriggerType
193188
pSchedule: !Ref pSchedule
@@ -259,7 +254,7 @@ Resources:
259254
Service: lambda.amazonaws.com
260255
Action: sts:AssumeRole
261256
Policies:
262-
- PolicyName: !Sub sdlf-${pDataset}-${pDeploymentInstance}-${pStageName}-routing
257+
- PolicyName: !Sub sdlf-${pDataset}-${pDeploymentInstance}-routing
263258
PolicyDocument:
264259
Version: "2012-10-17"
265260
Statement:
@@ -322,7 +317,7 @@ Resources:
322317
Service: lambda.amazonaws.com
323318
Action: sts:AssumeRole
324319
Policies:
325-
- PolicyName: !Sub sdlf-${pDataset}-${pDeploymentInstance}-${pStageName}-error
320+
- PolicyName: !Sub sdlf-${pDataset}-${pDeploymentInstance}-error
326321
PolicyDocument:
327322
Version: "2012-10-17"
328323
Statement:
@@ -349,7 +344,7 @@ Resources:
349344
reason: Permissions to write CloudWatch Logs are granted by rLambdaCommonPolicy
350345
Properties:
351346
CodeUri: ./lambda/routing/src
352-
FunctionName: !Sub sdlf-${pDataset}-${pDeploymentInstance}-${pStageName}-routing
347+
FunctionName: !Sub sdlf-${pDataset}-${pDeploymentInstance}-routing
353348
Description: Checks if items are to be processed and route them to state machine
354349
Environment:
355350
Variables:
@@ -367,7 +362,7 @@ Resources:
367362
reason: Permissions to write CloudWatch Logs are granted by rLambdaCommonPolicy
368363
Properties:
369364
CodeUri: ./lambda/redrive/src
370-
FunctionName: !Sub sdlf-${pDataset}-${pDeploymentInstance}-${pStageName}-redrive
365+
FunctionName: !Sub sdlf-${pDataset}-${pDeploymentInstance}-redrive
371366
Description: Redrives Failed messages to the routing queue
372367
MemorySize: 192
373368
Timeout: 300
@@ -382,7 +377,7 @@ Resources:
382377
reason: Permissions to write CloudWatch Logs are granted by rLambdaCommonPolicy
383378
Properties:
384379
CodeUri: ./lambda/postupdate-metadata/src
385-
FunctionName: !Sub sdlf-${pDataset}-${pDeploymentInstance}-${pStageName}-postupdate
380+
FunctionName: !Sub sdlf-${pDataset}-${pDeploymentInstance}-postupdate
386381
Description: Post-Update the metadata in the DynamoDB Catalog table
387382
MemorySize: 192
388383
Timeout: 300
@@ -397,7 +392,7 @@ Resources:
397392
reason: Permissions to write CloudWatch Logs are granted by rLambdaCommonPolicy
398393
Properties:
399394
CodeUri: ./lambda/error/src
400-
FunctionName: !Sub sdlf-${pDataset}-${pDeploymentInstance}-${pStageName}-error
395+
FunctionName: !Sub sdlf-${pDataset}-${pDeploymentInstance}-error
401396
Description: Fallback lambda to handle messages which failed processing
402397
MemorySize: 192
403398
Timeout: 300
@@ -410,7 +405,7 @@ Resources:
410405
Name: !Sub /sdlf/pipeline/rLambdaRoutingStep/${pDeploymentInstance}
411406
Type: String
412407
Value: !GetAtt rLambdaRoutingStep.Arn
413-
Description: !Sub "ARN of the ${pStageName} ${pDataset} ${pDeploymentInstance} Routing Lambda" # TODO
408+
Description: !Sub "ARN of the ${pDataset} ${pDeploymentInstance} Routing Lambda" # TODO
414409

415410
rLambdaRoutingStepLogGroup:
416411
Type: AWS::Logs::LogGroup
@@ -471,7 +466,7 @@ Resources:
471466
StringEquals:
472467
"aws:SourceAccount": !Sub ${AWS::AccountId}
473468
Policies:
474-
- PolicyName: !Sub sdlf-${pDataset}-${pDeploymentInstance}-${pStageName}-sm
469+
- PolicyName: !Sub sdlf-${pDataset}-${pDeploymentInstance}-sm
475470
PolicyDocument:
476471
Version: "2012-10-17"
477472
Statement:
@@ -519,7 +514,7 @@ Resources:
519514
rStateMachine:
520515
Type: AWS::Serverless::StateMachine
521516
Properties:
522-
Name: !Sub sdlf-${pDataset}-${pDeploymentInstance}-${pStageName}-sm
517+
Name: !Sub sdlf-${pDataset}-${pDeploymentInstance}-sm
523518
DefinitionUri: ./state-machine/stage-glue.asl.json
524519
DefinitionSubstitutions:
525520
lPostMetadata: !GetAtt rLambdaPostMetadataStep.Arn
@@ -542,7 +537,7 @@ Resources:
542537
Name: !Sub /sdlf/pipeline/rStateMachine/${pDeploymentInstance}
543538
Type: String
544539
Value: !Ref rStateMachine
545-
Description: !Sub "ARN of the ${pStageName} ${pDataset} ${pDeploymentInstance} State Machine" # TODO
540+
Description: !Sub "ARN of the ${pDataset} ${pDeploymentInstance} State Machine" # TODO
546541

547542
Outputs:
548543
oPipelineReference:

0 commit comments

Comments
 (0)