{"id":293,"date":"2021-01-18T14:38:29","date_gmt":"2021-01-18T19:38:29","guid":{"rendered":"https:\/\/packetlost.com\/blog\/?p=293"},"modified":"2021-01-19T11:56:55","modified_gmt":"2021-01-19T16:56:55","slug":"fargate-ecs-container-overrides-with-powershell","status":"publish","type":"post","link":"https:\/\/packetlost.com\/blog\/2021\/01\/18\/fargate-ecs-container-overrides-with-powershell\/","title":{"rendered":"Fargate \/ ECS Container Overrides with PowerShell"},"content":{"rendered":"\n<p>The other day I needed to launch some one-off Fargate \/ ECS container tasks with PowerShell. The <a href=\"https:\/\/docs.aws.amazon.com\/powershell\/latest\/reference\/items\/New-ECSTask.html\" target=\"_blank\" rel=\"noreferrer noopener\">documentation<\/a> covered most of what I needed but I could not find any examples on how to override environment variables sent to the container task.<\/p>\n\n\n\n<p>I only needed to change one environment variable so creating a whole new task definition seemed overkill for this purpose. After some trial and error the below code helped me get the job done. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-rich is-provider-embed-handler wp-block-embed-embed-handler\"><div class=\"wp-block-embed__wrapper\">\n<div class=\"oembed-gist\"><script src=\"https:\/\/gist.github.com\/Packet-Lost\/9a698924573e88be3d79a59b1e83b401.js\"><\/script><noscript>View the code on <a href=\"https:\/\/gist.github.com\/Packet-Lost\/9a698924573e88be3d79a59b1e83b401\">Gist<\/a>.<\/noscript><\/div>\n<\/div><\/figure>\n\n\n\n<p>If this helped you out please let me know in the comments. Feedback will motivate me to share solutions on this site more often. <\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The other day I needed to launch some one-off Fargate \/ ECS container tasks with PowerShell. The documentation covered most of what I needed but I could not find any examples on how to override environment variables sent to the &hellip;<\/p>\n<p class=\"read-more\"><a href=\"https:\/\/packetlost.com\/blog\/2021\/01\/18\/fargate-ecs-container-overrides-with-powershell\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,60,2],"tags":[7,57,58,59,3],"class_list":["post-293","post","type-post","status-publish","format-standard","hentry","category-amazon-web-services","category-ecs","category-powershell","tag-aws","tag-ecs","tag-elastic-container-service","tag-fargate","tag-powershell"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/packetlost.com\/blog\/wp-json\/wp\/v2\/posts\/293","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/packetlost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/packetlost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/packetlost.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/packetlost.com\/blog\/wp-json\/wp\/v2\/comments?post=293"}],"version-history":[{"count":1,"href":"https:\/\/packetlost.com\/blog\/wp-json\/wp\/v2\/posts\/293\/revisions"}],"predecessor-version":[{"id":294,"href":"https:\/\/packetlost.com\/blog\/wp-json\/wp\/v2\/posts\/293\/revisions\/294"}],"wp:attachment":[{"href":"https:\/\/packetlost.com\/blog\/wp-json\/wp\/v2\/media?parent=293"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/packetlost.com\/blog\/wp-json\/wp\/v2\/categories?post=293"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/packetlost.com\/blog\/wp-json\/wp\/v2\/tags?post=293"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}