hashicorp / packer-plugin-amazon

Packer plugin for Amazon AMI Builder
https://www.packer.io/docs/builders/amazon
Mozilla Public License 2.0
72 stars 110 forks source link

cannot access the alpine ec2 instance created from resultant AMI #38

Open ghost opened 3 years ago

ghost commented 3 years ago

This issue was originally opened by @ffoysal as hashicorp/packer#10293. It was migrated here as a result of the Packer plugin split. The original body of the issue is below.


Overview of the Issue

Created an AMI from source alpine AMI (alpine-ami-3.12.1-x86_64-r0). packer build was successful and produced the AMI. Can create an EC2 instance using the resultant AMI. But cannot ssh to the newly created EC2 instance using the same ssh-user, even though during the packer build the same user named alpine was successful. But ec2 instance created from source AMI (alpine-ami-3.12.1-x86_64-r0) can access it using the user named alpine

Reproduction Steps

alpine@'s password:

### Packer version

Packer v1.6.5

### Simplified Packer Buildfile

{ "builders": [ { "type": "amazon-ebs", "profile": "default", "region": "us-east-2", "source_ami_filter": { "filters": { "virtualization-type": "hvm", "name": "alpine-ami-3.12.1-x86_64-r0", "root-device-type": "ebs" }, "owners": ["538276064493"], "most_recent": true }, "instance_type": "t2.micro", "ssh_username": "alpine", "ami_name": "packer-example {{timestamp}}" } ] }



### Operating system and Environment details

Mac OS catalina 10.15.7
david-peters-aitch2o commented 3 years ago

I have the same issue with FreeBSD

richard-hp commented 1 month ago

I'm also experiencing this issue