This repository consists of a framework to deploy an AWS Service Catalog Portfolio and a Cross Account CodePipeline.
AWS Service Catalog lets you centrally manage deployed IT services, applications, resources, and metadata to achieve consistent governance of your infrastructure as code (IaC) templates, Service Catalog consists of products and portfolios.
A product is an IT service that you want to make available for deployment on AWS. A product consists of one or more AWS resources, such as EC2 instances, storage volumes, databases, monitoring configurations, and networking components.
AWS CloudFormation stacks make it easier to manage the lifecycle of your product by enabling you to provision, tag, update, and terminate your product instance as a single unit. An AWS CloudFormation stack includes an AWS CloudFormation template, written in either JSON or YAML format, and its associated collection of resources. A provisioned product is a stack. When an end user launches a product, the instance of the product that is provisioned by Service Catalog is a stack with the resources necessary to run the product.
A portfolio is a collection of products that contains configuration information. Portfolios help manage who can use specific products and how they can use them. With Service Catalog, you can create a customized portfolio for each type of user in your organization and selectively grant access to the appropriate portfolio.
You can deploy the Framework via either CloudShell or locally.
To change the region for the deployment, set the AWS_REGION and AWS_DEFAULT_REGION environment variables to the desired region
The most straightforward method to deploy this solution involves logging into your AWS account with the appropriate permissions and using AWS CloudShell
Log into your AWS account, navigate to the CloudShell page and clone the repository.
# Deploy the Service Catalog Framework and the CodePipeline Service Catalog Product
bash deploy.sh
- AWS CLI
- AWS SAM
- Docker Desktop When deploying locally instead of using CloudShell, the deployment script uses Docker to build the Lambdas with the proper dependencies.
Macs generally ship with older versions of Unix utilities. Ensure that you have the latest version of:
brew install bash
# install coreutils
brew install coreutils
# Use the coreutils version of the "realpath" command instead of the built in version
export PATH="/opt/homebrew/opt/coreutils/libexec/gnubin:$PATH"
From the terminal, after you clone the repository, run the following commands.
pip3 install -r requirements.txt
npm install -g cfn-include
sudo yum install jq
export TargetAccount=$(aws sts get-caller-identity | jq -r ".Account")
# Deploy the Service Catalog Framework and the CodePipeline Service Catalog Product
bash deploy.sh