MCPcopy Create free account
hub / github.com/CodeClash-ai/CodeClash / get_aws_metadata

Function get_aws_metadata

codeclash/utils/aws.py:14–27  ·  view source on GitHub ↗

Returns a dictionary of AWS metadata.

()

Source from the content-addressed store, hash-verified

12
13
14def get_aws_metadata() -> dict:
15 """Returns a dictionary of AWS metadata."""
16 if not is_running_in_aws_batch():
17 return {}
18 # Official AWS Batch environment variables as documented at:
19 # https://docs.aws.amazon.com/batch/latest/userguide/job_env_vars.html
20 env_variables = [
21 "AWS_BATCH_CE_NAME",
22 "AWS_BATCH_JOB_ATTEMPT",
23 "AWS_BATCH_JOB_ID",
24 "AWS_BATCH_JQ_NAME",
25 "AWS_USER_PROVIDED_COMMAND", # we defined that ourselves in docker_entrypoint.sh
26 ]
27 return {env_variable: os.getenv(env_variable) for env_variable in env_variables}
28
29
30def pull_game_container_aws_ecr(*, game_name: str, image_name: str, logger: Logger) -> None:

Callers 1

__init__Method · 0.90

Calls 1

is_running_in_aws_batchFunction · 0.85

Tested by

no test coverage detected