https://github.com/bwinkers/simple-codeartifact-cloudformation
A simple Cloudformation file for building a useful Code Artifact for hosting and caching modules.
https://github.com/bwinkers/simple-codeartifact-cloudformation
artifact aws cloudformation-template code npm pip yarn
Last synced: 24 days ago
JSON representation
A simple Cloudformation file for building a useful Code Artifact for hosting and caching modules.
- Host: GitHub
- URL: https://github.com/bwinkers/simple-codeartifact-cloudformation
- Owner: bwinkers
- License: mit
- Created: 2020-11-14T00:29:57.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2020-11-15T18:43:20.000Z (over 4 years ago)
- Last Synced: 2025-02-15T06:30:26.507Z (3 months ago)
- Topics: artifact, aws, cloudformation-template, code, npm, pip, yarn
- Homepage:
- Size: 275 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# simple-codeartifact-cloudformation
A simple Cloudformation for building a useful Code Artifact for hosting and caching modules.## Get Code
```bash
git clone [email protected]:bwinkers/simple-codeartifact-cloudformation.git
```## Change in the repo directory
```bash
cd simple-codeartifact-cloudformation
```## Verify the file
```bash
aws cloudformation validate-template --template-body file://template.yaml
{
"Parameters": []
}
```## Deploy the stack
```bash
aws cloudformation deploy --template-body file://template.yaml --stack-name private-repo-stack
```## Get Login instructions from AWS Console
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.

## Auth for Javascript
```bash
aws codeartifact login --tool npm --repository private-repo --domain internal-development --domain-owner xxxxxxxxxx
```### Logins are valid for 12 hours
```
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
```## Auth for Python
```bash
aws codeartifact login --tool pip --repository private-repo --domain internal-development --domain-owner xxxxxxxxxx
```## View packages in repo
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.