--- AWSTemplateFormatVersion: '2010-09-09' Description: Serverless Portfolio for Service Catalog. (fdp-1p5s1036d) Metadata: AWS::CloudFormation::Interface: ParameterGroups: - Label: default: Portfolio Information Parameters: - PortfolioName - PortfolioProvider - PortfolioDescription - Label: default: IAM Settings Parameters: - LaunchRoleName - LinkedRole1 - LinkedRole2 - Label: default: Product Settings Parameters: - RepoRootURL Parameters: PortfolioProvider: Type: String Description: Provider Name Default: IT Services PortfolioName: Type: String Description: Portfolio Name Default: Service Catalog Serverless Reference Architecture PortfolioDescription: Type: String Description: Portfolio Description Default: Service Catalog Portfolio that contains reference architecture products for Serverless Framework. LaunchRoleName: Type: String Description: Name of the launch constraint role for Serverless products. leave this blank to create the role. Default: '' LinkedRole1: Type: String Description: "(Optional) The name of a role which can execute products in this portfolio." Default: '' LinkedRole2: Type: String Description: "(Optional) The name of a second role which can execute products in this portfolio." Default: '' RepoRootURL: Type: String Description: Root url for the repo containing the product templates. Default: 'https://s3.amazonaws.com/aws-service-catalog-reference-architectures/' Conditions: CreateLaunchConstraint: Fn::Equals: - Ref: LaunchRoleName - '' CondLinkRole1: Fn::Not: - Fn::Equals: - Ref: LinkedRole1 - '' CondLinkRole2: Fn::Not: - Fn::Equals: - Ref: LinkedRole2 - '' Resources: serverlessFrameworkDeploymentBucket: Type: AWS::S3::Bucket Properties : BucketName: !Sub "serverless-src-${AWS::AccountId}" SCServerlessPortfolio: Type: AWS::ServiceCatalog::Portfolio Properties: ProviderName: Ref: PortfolioProvider Description: Ref: PortfolioDescription DisplayName: Ref: PortfolioName addrole1: Type: AWS::ServiceCatalog::PortfolioPrincipalAssociation Condition: CondLinkRole1 Properties: PrincipalARN: Fn::Sub: arn:aws:iam::${AWS::AccountId}:role/${LinkedRole1} PortfolioId: Ref: SCServerlessPortfolio PrincipalType: IAM addrole2: Type: AWS::ServiceCatalog::PortfolioPrincipalAssociation Condition: CondLinkRole2 Properties: PrincipalARN: Fn::Sub: arn:aws:iam::${AWS::AccountId}:role/${LinkedRole2} PortfolioId: Ref: SCServerlessPortfolio PrincipalType: IAM LaunchConstraintRole: Type: AWS::CloudFormation::Stack Condition: CreateLaunchConstraint Properties: TemplateURL: Fn::Sub: "${RepoRootURL}iam/sc-serverless-launchrole.yml" TimeoutInMinutes: 5 serverlessproduct: Type: AWS::CloudFormation::Stack Properties: Parameters: PortfolioProvider: Ref: PortfolioProvider LaunchConstraintARN: Fn::If: - CreateLaunchConstraint - Fn::GetAtt: - LaunchConstraintRole - Outputs.LaunchRoleArn - Fn::Sub: arn:aws:iam::${AWS::AccountId}:role/${LaunchRoleName} PortfolioId: Ref: SCServerlessPortfolio RepoRootURL: Ref: RepoRootURL TemplateURL: Fn::Sub: "${RepoRootURL}serverless/sc-product-serverless-lambda.yml" TimeoutInMinutes: 5 Outputs: PortfolioId: Description: The Service Catalog portfolioId Value: Ref: SCServerlessPortfolio LaunchConstraintRoleARN: Condition: CreateLaunchConstraint Value: Fn::GetAtt: - LaunchConstraintRole - Outputs.LaunchRoleArn LaunchConstraintRoleName: Condition: CreateLaunchConstraint Value: Fn::GetAtt: - LaunchConstraintRole - Outputs.LaunchRoleName serverlessProductId: Description: The Service Catalog Lambda productId. Value: Fn::GetAtt: - serverlessproduct - Outputs.ProductId serverlessProvisioningArtifactIds: Value: Fn::GetAtt: - serverlessproduct - Outputs.ProvisioningArtifactIds serverlessProvisioningArtifactNames: Value: Fn::GetAtt: - serverlessproduct - Outputs.ProvisioningArtifactNames PortfolioProvider: Description: The name of the portfolio admin Value: Ref: PortfolioProvider ServerlessDeploymentBucket: Description: The bucket housing the lambda code for deployment Value: !Ref serverlessFrameworkDeploymentBucket