aws / aws-sdk-net

The official AWS SDK for .NET. For more information on the AWS SDK for .NET, see our web site:
http://aws.amazon.com/sdkfornet/
Apache License 2.0
2.02k stars 849 forks source link

ECS Container Metadata utility class #1891

Open ehakan-veloxia opened 2 years ago

ehakan-veloxia commented 2 years ago

It would be great to have a standardized way of accessing ECS Container Metadata in the Amazon.Util namespace, much like EC2InstanceMetadata

Describe the Feature

A utility class that allows access to ECS Container Metadata available on configured ECS containers.

Is your Feature Request related to a problem?

While it's easy to parse the metadata (it's a JSON file with the path declared in an environment variable), the metadata itself does not become immediately available. If this utility could provide a way to properly await for availability of the metadata, it would be quite user-friendly.

Describe alternatives you've considered

My personal solution currently uses Newtonsoft.JSON to retry parsing the file until it becomes available. But it's a Unity specific implementation that uses coroutines.

Additional Context

We run a cluster of game servers with ECS, with dynamically assigned ports. Our game servers need to be aware of their assigned ports and hosts' IPs so they can relay the connection information to a management service.

Environment

If parse retry mechanisms are implemented, Unity's retry might need to differ.


This is a :rocket: Feature Request

ashishdhingra commented 2 years ago

Appears to be useful feature request for users. This needs review with the team.