@@ -1441,6 +1441,68 @@ Resources:
14411441 FunctionName : !Ref NinoCheckFunction.Alias
14421442 Principal : apigateway.amazonaws.com
14431443
1444+ IssueCredentialFunction :
1445+ Type : AWS::Serverless::Function
1446+ Metadata :
1447+ BuildMethod : esbuild
1448+ BuildProperties :
1449+ Sourcemap : true
1450+ Properties :
1451+ DeploymentPreference :
1452+ Type : !Ref LambdaDeploymentPreference
1453+ Alarms : !If
1454+ - UseCanaryDeploymentAlarms
1455+ - [!Ref NinoCheckFunctionCanaryErrors]
1456+ - [!Ref AWS::NoValue]
1457+ Role : !GetAtt CodeDeployServiceRole.Arn
1458+ Handler : lambdas/issue-credential/src/handler.handler
1459+ LoggingConfig :
1460+ LogGroup : !Sub /aws/lambda/${AWS::StackName}/IssueCredentialFunction
1461+ CodeSigningConfigArn : !If [EnforceCodeSigning, !Ref CodeSigningConfigArn, !Ref AWS::NoValue]
1462+ Policies :
1463+ - DynamoDBReadPolicy :
1464+ TableName : !Sub "{{resolve:ssm:/${CommonStackName}/SessionTableName}}"
1465+ - DynamoDBReadPolicy :
1466+ TableName : !Sub "{{resolve:ssm:/${CommonStackName}/PersonIdentityTableName}}"
1467+ - DynamoDBReadPolicy :
1468+ TableName : !Ref UserAttemptsTable
1469+ - DynamoDBReadPolicy :
1470+ TableName : !Ref NinoUsersTable
1471+ - EventBridgePutEventsPolicy :
1472+ EventBusName : !Ref CheckHmrcEventBus
1473+ Environment :
1474+ Variables :
1475+ POWERTOOLS_SERVICE_NAME : !Sub "${CriIdentifier}-IssueCredentialFunction"
1476+ SESSION_TABLE : !Sub "{{resolve:ssm:/${CommonStackName}/SessionTableName}}"
1477+ PERSON_IDENTITY_TABLE : !Sub "{{resolve:ssm:/${CommonStackName}/PersonIdentityTableName}}"
1478+ ATTEMPT_TABLE : !Ref UserAttemptsTable
1479+ NINO_USER_TABLE : !Ref NinoUsersTable
1480+ AUDIT_EVENT_BUS : !Ref CheckHmrcEventBus
1481+ AUDIT_SOURCE : !FindInMap [EnvironmentConfiguration, !Ref Environment, DOMAINNAME]
1482+ AUDIT_ISSUER : !Sub "{{resolve:ssm:/${CommonStackName}/verifiable-credential/issuer}}"
1483+ LOG_FULL_ERRORS : !If [IsProdEnvironment, "false", "true"]
1484+
1485+ IssueCredentialFunctionLogGroup :
1486+ Type : AWS::Logs::LogGroup
1487+ Properties :
1488+ LogGroupName : !Sub /aws/lambda/${AWS::StackName}/IssueCredentialFunction
1489+ RetentionInDays : 30
1490+
1491+ IssueCredentialFunctionLogsSubscriptionFilterCSLS :
1492+ Type : AWS::Logs::SubscriptionFilter
1493+ Condition : IsNotDevLikeEnvironment
1494+ Properties :
1495+ DestinationArn : !FindInMap [PlatformConfiguration, !Ref Environment, CSLSEGRESS]
1496+ FilterPattern : " "
1497+ LogGroupName : !Ref IssueCredentialFunctionLogGroup
1498+
1499+ IssueCredentialFunctionPermission :
1500+ Type : AWS::Lambda::Permission
1501+ Properties :
1502+ Action : lambda:InvokeFunction
1503+ FunctionName : !Ref IssueCredentialFunction.Alias
1504+ Principal : apigateway.amazonaws.com
1505+
14441506 NinoCheckStateMachine :
14451507 Type : AWS::Serverless::StateMachine
14461508 Properties :
0 commit comments