A simple Cloudformation for building a useful Code Artifact for hosting and caching modules.
git clone git@github.com:bwinkers/simple-codeartifact-cloudformation.git
cd simple-codeartifact-cloudformation
aws cloudformation validate-template --template-body file://template.yaml
{
"Parameters": []
}
aws cloudformation deploy --template-body file://template.yaml --stack-name private-repo-stack
Login to the console and view Code Artifact to see your repos.
Click the big orange button to get connection info fot your package manager.
aws codeartifact login --tool npm --repository private-repo --domain internal-development --domain-owner xxxxxxxxxx
aws codeartifact login --tool npm --repository private-repo --domain internal-development --domain-owner xxxxxxxxxxxx
Successfully configured npm to use AWS CodeArtifact repository https://internal-development-xxxxxxxxxxxx.d.codeartifact.us-east-1.amazonaws.com/npm/private-repo/
Login expires in 12 hours at 2020-11-15 22:35:00-08:00
aws codeartifact login --tool pip --repository private-repo --domain internal-development --domain-owner xxxxxxxxxx
Install some packages using your package manager. If the package is found in your internal repo it is used. If not the package is downloaded from the public repo and stored.