Closed 123BLiN closed 1 year ago
I also have a feeling the session manager plugin isn't working properly using this action. Getting the following error when packer trying to connect to an EC2 instance via SSM: "session-manager-plugin": executable file not found in $PATH
I didn't manage to workaround it by installing the AWS SSM plugin on the GH runner as part of another step within the same GH workflow job.
I think the only option may be to add it to the docker file like this https://github.com/aws/session-manager-plugin/issues/12#issuecomment-972880203 - trying to evaluate it, or switch from packer:light to other docker, like ubuntu based but it seems this is not desired based on https://github.com/hashicorp/docker-hub-images/issues/100
If the trick with docker RUN on alpine will work I will try to add a PR that will allow such steps, if not - only fork locally and adjust for your needs, also one more customisation I can think of is ~packer init
support~ it is supported actually
This worked for my case - but only in fork of this repo, as I'm changing the base Docker image https://github.com/skeggse/docker-packer-ssm/blob/main/Dockerfile
Thank you for reporting this @123BLiN.
In the legacy version of this Action, this wasn't supported. You should be able to use SSM (and similar tooling) with the latest version of this Action.
See #63
Got the same error Getting the following error when packer trying to connect to an EC2 instance via SSM: "session-manager-plugin": executable file not found in $PATH , while trying to use github actions. Previously had a stage defined for installing session mananger . At the end I added RUN wget https://s3.amazonaws.com/session-manager-downloads/plugin/latest/ubuntu_64bit/session-manager-plugin.deb && dpkg -i session-manager-plugin.deb && rm session-manager-plugin.deb in my docker file and it worked.
Expected Behavior
Be useful for AWS packer builds
Current Behavior
Not useful - forked
Dockerfile that works in my case:
Maybe it can be useful to allow to specify dockerfile content and override default one?
Steps to Reproduce
Try to build AMI in AWS with SSM session
Environment
AWS account with SSM session for connections