https://github.com/grvcoelho/169254
:pager: A simple API that simulate AWS EC2's metadata endpoint
https://github.com/grvcoelho/169254
api aws golang metadata
Last synced: 4 months ago
JSON representation
:pager: A simple API that simulate AWS EC2's metadata endpoint
- Host: GitHub
- URL: https://github.com/grvcoelho/169254
- Owner: grvcoelho
- License: mit
- Created: 2018-05-09T22:28:28.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-29T15:58:04.000Z (about 8 years ago)
- Last Synced: 2025-04-16T01:45:02.010Z (about 1 year ago)
- Topics: api, aws, golang, metadata
- Language: Go
- Homepage: https://169254.now.sh
- Size: 1.6 MB
- Stars: 16
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 169254
:pager: A simple API that simulate AWS EC2's metadata endpoint
## Why
Every EC2 Instance from AWS have access to a special metadata service that is used to retrieve metadata information about the instance such as `ami-id` and `local-ipv4`. The metadata service is tipically accessible on the private endpoint http://169.254.169.254 and cannot be accessed outside of the instance.
Whether you're writing some tests or building an application that data given back by the service metadata, you'll need to run it inside the instance or use some kind of mock API.
This project is a mock API deployed at https://169254.now.sh that you can use to assert the service metadata response structure and possible fields. **Note:** all data returned by https://169254.now.sh is hard-coded, so the results will be different when you access the real service metadata within your EC2 Instances.
## Usage
The following are the current implemented enpdoints of the metadata service. Feel free to open a Pull Request to add any new endpoints:
* https://169254.now.sh/latest/meta-data/ami-id
* https://169254.now.sh/latest/meta-data/ami-launch-index
* https://169254.now.sh/latest/meta-data/ami-manifest-path
* https://169254.now.sh/latest/meta-data/block-device-mapping/ami
* https://169254.now.sh/latest/meta-data/block-device-mapping/root
* https://169254.now.sh/latest/meta-data/instance-id
* https://169254.now.sh/latest/meta-data/instance-type
* https://169254.now.sh/latest/meta-data/placement/availability-zone
* https://169254.now.sh/latest/meta-data/profile
* https://169254.now.sh/latest/meta-data/hostname
* https://169254.now.sh/latest/meta-data/local-hostname
* https://169254.now.sh/latest/meta-data/local-ipv4
* https://169254.now.sh/latest/meta-data/public-hostname
* https://169254.now.sh/latest/meta-data/public-ipv4
* https://169254.now.sh/latest/meta-data/reservation-id
* https://169254.now.sh/latest/meta-data/security-groups
* https://169254.now.sh/latest/meta-data/services/domain
* https://169254.now.sh/latest/meta-data/services/partition