Skip to content

Conversation

@ford-at-aws
Copy link
Contributor

@ford-at-aws ford-at-aws commented Oct 2, 2024

This PR updates all Weathertop plugin stacks so that a new environment variable is available as a part of all Job Definitions.

NOTE: As part of testing, this change has been deployed to all plugin environments.

Docs on using custom EnvVars in AWS Batch Fargate using ContainerProperties

Here is an example of the new Job Def, presented here in JSON format bc the EnvVar is not visible in the Console:

{
  "jobDefinitionName": "JobDefn-xxxxxx",
  "jobDefinitionArn": "arn:aws:batch:us-east-1:xxxxxxx:job-definition/JobDefn-xxxxx:3",
  "revision": 3,
  "status": "ACTIVE",
  "type": "container",
  "parameters": {},
  "containerProperties": {
    "image": "808326389482.dkr.ecr.us-east-1.amazonaws.com/cpp:latest",
    "command": [],
    "jobRoleArn": "arn:aws:iam::770244195820:role/BatchExecutionRole-cpp",
    "executionRoleArn": "arn:aws:iam::770244195820:role/BatchExecutionRole-cpp",
    "volumes": [],
    "environment": [
      {
        "name": "S3_BUCKET_NAME_PREFIX",
        "value": "sdk-example-code"
      }
    ],
    "mountPoints": [],
    "ulimits": [],
    "resourceRequirements": [
      {
        "value": "4",
        "type": "VCPU"
      },
      {
        "value": "16384",
        "type": "MEMORY"
      }
    ],
    "secrets": [],
    "networkConfiguration": {
      "assignPublicIp": "ENABLED",
      "interfaceConfigurations": []
    },
    "fargatePlatformConfiguration": {
      "platformVersion": "LATEST"
    }
  },
  "tags": {},
  "propagateTags": false,
  "platformCapabilities": [
    "FARGATE"
  ],
  "containerOrchestrationType": "ECS"
}

@ford-at-aws ford-at-aws self-assigned this Oct 2, 2024
@github-actions github-actions bot added the Tools This issue relates to a custom tooling to streamline development tasks label Oct 2, 2024
@ford-at-aws ford-at-aws changed the title Update Weathertop to include env Vars Tools - Weathertop: Update plugin stacks to include env Vars Oct 2, 2024
@ford-at-aws ford-at-aws changed the title Tools - Weathertop: Update plugin stacks to include env Vars Tools - Weathertop: Update plugin stacks to include EnvVars Oct 2, 2024
@ford-at-aws ford-at-aws added the Task A general update to the code base for language clarification, missing actions, tests, etc. label Oct 2, 2024
@ford-at-aws ford-at-aws requested a review from cpyle0819 October 3, 2024 15:36
Copy link
Contributor

@cpyle0819 cpyle0819 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommending creating a variables.json file that can be read, parsed, and passed directly to the batch env vars instead of doing the extra processing.

@ford-at-aws ford-at-aws added the On Call Review needed This work needs an on-call review label Oct 9, 2024
@DavidSouther DavidSouther added On Call Review complete On call review complete and removed On Call Review needed This work needs an on-call review labels Oct 9, 2024
@DavidSouther DavidSouther merged commit 659f9fc into awsdocs:main Oct 9, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

On Call Review complete On call review complete Task A general update to the code base for language clarification, missing actions, tests, etc. Tools This issue relates to a custom tooling to streamline development tasks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants