Skip to content

Instantly share code, notes, and snippets.

View hussfelt's full-sized avatar
:shipit:
All in - no fold.

Henrik Hussfelt hussfelt

:shipit:
All in - no fold.
View GitHub Profile

Keybase proof

I hereby claim:

  • I am hussfelt on github.
  • I am hussfelt (https://keybase.io/hussfelt) on keybase.
  • I have a public key ASACMdnwf32QEUF_xGwRo3zNswIMoUAoyBPuzZm0jGAwsAo

To claim this, I am signing this object:

@hussfelt
hussfelt / README.md
Last active July 23, 2020 18:13
How to configure ECS EC2 instances to authenticate to JFrog Artifactory Docker Registry

How to configure ECS EC2 instances to authenticate to JFrog Artifactory Docker Registry

The JFrog documentation is lacking on how to do this in a proper way, expecting to use the normal procedures for logging into docker and not in an automated way. This gets even worse if you try and configure your task to authenticate to a private registry - which does not seem to be possible.

The solution is to adjust your user-data, preferably storing your config and key in Secrets Manager.

Putting the config into Secret Manager:

aws secretsmanager update-secret --secret-id artifactory --region us-west-1 --secret-string '{"https://companyname-repo-virtual.jfrog.io": {"auth": "AUTHKEY_FROM_SETMEUP","email": "EMAIL_FROM_SETMEUP"}}'
@hussfelt
hussfelt / README.md
Last active April 2, 2024 21:25
AWS and Terraform: Simplest redirect possible for redirecting traffic from one domain to another

AWS and Terraform site redirect

Using example.com as the input domain, this module will:

  • Create a Route53 zone for example.com
  • Create a bucket named example.com
  • Create a bucket named www.example.com
  • Create a Route53 A record example.com for the static website bucket of example.com
  • Create a Route53 A record www.example.com for the static website bucket of www.example.com
@hussfelt
hussfelt / README.md
Created October 15, 2018 19:53
Use Terraform and Lambda to automatically purge old IAM user passwords and access keys

Purge IAM secrets

This terraform module and lambda will remove passwords and secrets that have been unused for too long.

Usage

Put the files in a module folder, for example modules/purge-iam-secrets Use module like this within your terraform plan: