{"id":18147247,"url":"https://github.com/minhajul/aws-machine-image-using-packer","last_synced_at":"2026-05-08T13:33:43.759Z","repository":{"id":260593721,"uuid":"868225585","full_name":"minhajul/aws-machine-image-using-packer","owner":"minhajul","description":"Creating a preconfigured amazon machine image(AMI) with PHP, Nginx using Packer.","archived":false,"fork":false,"pushed_at":"2024-10-07T09:37:31.000Z","size":42,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-13T03:23:23.492Z","etag":null,"topics":["aws","hashicorp","machine-image","nginx","packer","packer-template","php"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/minhajul.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-05T19:56:02.000Z","updated_at":"2024-10-07T09:37:34.000Z","dependencies_parsed_at":"2024-11-01T09:12:39.373Z","dependency_job_id":"6f02c0e0-4833-4a31-8799-15e84830d8ef","html_url":"https://github.com/minhajul/aws-machine-image-using-packer","commit_stats":null,"previous_names":["minhajul/aws-machine-image-using-packer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minhajul%2Faws-machine-image-using-packer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minhajul%2Faws-machine-image-using-packer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minhajul%2Faws-machine-image-using-packer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minhajul%2Faws-machine-image-using-packer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/minhajul","download_url":"https://codeload.github.com/minhajul/aws-machine-image-using-packer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247553025,"owners_count":20957391,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","hashicorp","machine-image","nginx","packer","packer-template","php"],"created_at":"2024-11-01T22:06:03.534Z","updated_at":"2026-05-08T13:33:43.752Z","avatar_url":"https://github.com/minhajul.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Packer Configuration For Creating an AMI\n\nPacker is a free and open source tool for creating golden images for multiple platforms from a single source configuration.\n\n### Use Cases\n- Automated image builds\n- Integrate with Terraform\n\n### Getting Started\nAfter cloning this project, you can start editing the configurations by modifying ```machine-image.pkr.hcl```.\n\nTo proceed, you need to specify your ```vpc_id``` and ```subnet_id```. You can retrieve these values using the AWS CLI:\n\n```bash\naws ec2 describe-vpcs --query 'Vpcs[].VpcId' --region ap-southeast-1\n\naws ec2 describe-subnets --filters Name=vpc-id,Values=\u003cyour-vpc-id\u003e --query 'Subnets[].SubnetId' --region ap-southeast-1\n```\nThese commands will return your VPC and subnet IDs. After obtaining them, update the ```machine-image.pkr.hcl``` file accordingly.\n\n```bash \nvariable \"vpc_id\" {\n  type        = string\n  description = \"Target VPC ID for building the AMI\"\n  default     = \"vpc-****\" # Replace with your VPC ID\n}\n\nvariable \"subnet_id\" {\n  type        = string\n  description = \"Public subnet ID for temporary instance\"\n  default     = \"subnet-****\" # Replace with your public subnet ID\n}\n```\n\nOnce you've made the changes, validate your configuration using:\n\n```bash\npacker init machine-image.pkr.hcl\n```\nThen \n\n```bash\npacker validate machine-image.pkr.hcl\n```\n\nThen, run the below command to create an image to your configured provider account.\n\n```bash\npacker build -var \"infra_env=staging\" machine-image.pkr.hcl\n```\nYou can change `infra_env` whatever you want.\n\nCheck out our [Official Documentation](https://www.packer.io/) for more details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminhajul%2Faws-machine-image-using-packer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fminhajul%2Faws-machine-image-using-packer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminhajul%2Faws-machine-image-using-packer/lists"}