Categories
General MacOS

MacOS keychain with AWS CodeCommit

Using temporary credentials (access-tokens) with AWS CodeCommit and git clients can be hard with MacOS. The Keychain saves those credentials and after ~15min you must renew them (remove them manually from the keychain). And if you have also to work with repositories other than AWS (like GitHub, GitLab) its even worse. But since recent git versions (>2.9) it is possible to reset the credential helper by Git-Host!

Using the git credential-helper for CodeCommit repositories only:

[credential "https://git-codecommit.eu-central-1.amazonaws.com"]
  helper=
  helper=!aws codecommit --profile developer-cloudformation credential-helper $@
        UseHttpPath = true

It’s important to add that “helper=” line. Regularly the global git config contains a “helper=osxkeychain” line and those helper-directives are additive – but the “helper=” line breaks/resets that inheritance.

Categories
General

Cloud storage cost calculation (backup/restore)

Related to my offsite-backup with restic project I recently wanted to choose an cloud-provider as backup target. But that seems not an easy decision. Besides the costs for storage and traffic things getting complicated when it comes to restore: Pricing differs here from $10 to $1300 for a single restore of 500GB!

Although I use mainly AWS for my business projects I consider to use google cloud storage for my private backup. Main reason for me is that the restore options for AWS S3 Glacier are not easy to predict and the costs could be very different.