Complex applications on AWS frequently combine not only the core code but also connections to resources and dependencies (such as ECS Tasks and Lambdas). We’re excited to announce support for ECS tasks! Development, testing, and production of complex apps can now be managed through our newest Release update. This latest update includes support for the use of IaC (Infrastructure as Code, for example, Terraform and Pulumi) to create resources in ECS, which you can manage in Release right alongside your EKS resources. In this post, we'll show you some simple set-up steps to add ECS resources to Release, access them through the terminal, and view their logs.
Release is a Kubernetes-first platform, but we have many customers that have described their environments in detail with an IaC and would like their environments to match their production environments as closely as possible. With our support for ECS you can now view and manage your ECS and EKS resources through Release’s single administration interface. Release automatically tags and configures your ECS resources if you use our Infrastructure Runner, but we also allow you to tag and configure any ECS resources and manage them in Release, regardless of how they were deployed.
AWS ECS Task Support
The first supported cloud resources are AWS ECS Tasks, but more resource types will be supported soon. Let us know what cloud resources you’d like to see supported!
After tagging a resource, it will show up on the Environment page in the Cloud Resources section, below your Instances.
Cloud Resources like this ECS Task are listed on the environment page in a section below Instances. ECS Tasks support Terminal and Logs, which you launch by clicking the corresponding button.
Interacting with Cloud Resources
Currently, once you've tagged them, ECS Tasks support a couple of actions: Terminal and Logs (note the Terminal and Logs buttons in the previous screenshot).
You can launch a web terminal into the task containers by clicking the Terminal button:
And you can view container logs by clicking the Logs button:
How to add Cloud Resources
To add a cloud resource to your Release environments, you'll need to add a couple of tags/labels to that resource in AWS or GCP.
Two tags with values are required:
AWS Documentation can be found here.
How to Configure the Logs
In order to send your ECS task logs to the Release log viewer, you must configure your ECS tasks to use the awslogs log driver:
You can specify the log driver in the task definition. Inside each entry in containerDefinitions, update (or add) the logConfiguration key to specify the logDriver and options. Options must specify awslogs-group, and awslogs-stream-prefix. The logDriver must be awslogs, but you may choose your own group and stream-prefix.
That section of your task definition should look something like this when you’re done:
For more details, check out the AWS documentation on using the awslogs log driver.
How to Configure the Terminal
The following requirements must be met before being able to terminal into any ECS task:
- ECS Exec needs to be enabled for the task. (more info)
- ECS Exec IAM permissions need to be added for the task. (more info)
For more details, check out the AWS documentation on enabling ECS Exec and the best practices around it.
After configuring the ECS task, use the Cloud Resources refresh button and you should be able to choose the container to terminal into. Note that Release will gray out the terminal button for containers that are not running or tasks that do not have ECS Exec enabled.
Try it Yourself
At Release we always try to support the infrastructure our customers have in place while allowing them to take advantage of any new offerings from AWS. If you would like to manage your containers, regardless of which container management service you use, read through our documentation and/or schedule a demo!
Use code #IDP to get 30 days free.
Release is the simplest way to spin up even the most complicated environments. We specialize in taking your complicated application and data and making reproducible environments on-demand.