spacechunks / packer-plugin-s3

HashiCorp Packer plugin providing a provisioner for S3 file retrival
MIT License
4 stars 1 forks source link

Support for AWS profiles (IAM credentials and SSO) #2

Open n0ct1s-k8sh opened 2 days ago

n0ct1s-k8sh commented 2 days ago

Background

It's known that IAM access and secret keys are sensible and discouraged to use, as the SSO profiles are implemented constantly.

Goal

A profile parameter which contains the profile name configured in the AWS CLI should be implemented to authenticate and perform the operations within the AWS SDK (which I see it is not implemented).

References

Example

packer {
  required_plugins {
    s3 = {
      version = "1.0.0"
      source = "github.com/spacechunks/s3"
    }
  }
}

provisioner "s3" {
  profile = "<aws-cli-profile-name>"
  endpoint = "s3.amazonaws.com"
  objects {
    source = "mybucket/myfolder/somefile"
    destination = "/etc/myobject2"
  }
  objects {
    source = "mybucket2/myfolder/somefile"
    destination = "/etc/myobject2"
  }
}
freggy commented 2 days ago

hey, thanks for opening an issue :) it makes sense switching to the official AWS S3 SDK. i will implement this, but currently I am busy with other things, so I can't give you an ETA when this will be ready.

i will reach out to you, once it's implemented.