Skip to content

Instantly share code, notes, and snippets.

View smparekh's full-sized avatar
🖤
🚀 🛰 🎶 📡

Shaishav Parekh smparekh

🖤
🚀 🛰 🎶 📡
View GitHub Profile
@smparekh
smparekh / config.fish
Last active May 10, 2022 16:52
Using CodeArtifact as Pypi mirror for Pipenv
set -x AWS_PROFILE default # replace
set -x AWS_REGION us-east-1 # replace
set -x CODEARTIFACT_DOMAIN foo # replace
set -x CODEARTIFACT_DOMAIN_ID 123456789 # replace
set -x CODEARTIFACT_REPOSITORY somepypi # replace
function codeartifact_login
set -Ux CODEARTIFACT_TOKEN (aws --profile $AWS_PROFILE codeartifact get-authorization-token --domain $CODEARTIFACT_DOMAIN --domain-owner $CODEARTIFACT_DOMAIN_ID --query authorizationToken --output text)
set -Ux PIPENV_PYPI_MIRROR "https://aws:$CODEARTIFACT_TOKEN@$CODEARTIFACT_DOMAIN-$CODEARTIFACT_DOMAIN_ID.d.codeartifact.$AWS_REGION.amazonaws.com/pypi/$CODEARTIFACT_REPOSITORY/simple/"
end