amazon-ecs

Gracefully stopping ecs container

僤鯓⒐⒋嵵緔 提交于 2021-02-18 06:44:31
问题 I am having some docker container which listens on RabbitMQ and process the message received.I have a code pipeline which kicks off the rebuilding of the image and updating the tasks when there is a code commit. My problem here is the container will be killed abruptly during the message processing is there any way where i can stop the container killing until the process is finished and allow it to stop so that a new new container will be automatically created as i am ok with the current

Cloudformation template for creating ECS service stuck in CREATE_IN_PROGRESS

烂漫一生 提交于 2021-02-17 21:06:37
问题 I am creating an AWS ECS service using Cloudformation. Everything seems to complete successfully, I can see the instance being attached to the load-balancer, the load-balancer is declaring the instance as being healthy, and if I hit the load-balancer I am successfully taken to my running container. Looking at the ECS control panel, I can see that the service has stabilised, and that everything is looking OK. I can also see that the container is stable, and is not being terminated/re-created.

What's the best way to store a config file for a Docker container on AWS?

寵の児 提交于 2021-02-16 20:35:54
问题 I have a node.js app which has a config file with sensitive data. I want to launch it through AWS ECS (cluster) as a docker container. What would be the best way to store the sensitive config data? I am currently sending them through the environmental variables in the Task Definition of the Docker container, but there has to be a better way to do that. What is the best practice for something like this? Shall I use Docker secrets or Amazon secrets manager? I know it's a pretty general question

What's the best way to store a config file for a Docker container on AWS?

馋奶兔 提交于 2021-02-16 20:35:09
问题 I have a node.js app which has a config file with sensitive data. I want to launch it through AWS ECS (cluster) as a docker container. What would be the best way to store the sensitive config data? I am currently sending them through the environmental variables in the Task Definition of the Docker container, but there has to be a better way to do that. What is the best practice for something like this? Shall I use Docker secrets or Amazon secrets manager? I know it's a pretty general question

AWS CodePipeline with ECS Blue/Green deployment fails with internal error

牧云@^-^@ 提交于 2021-02-11 14:05:11
问题 I have a CodePipeline set up where changes to code builds and pushes an image to ECR. I am looking to automate updating ECS with the new image as it is built. I have configured the ECS Blue/Green action but when it runs it fails almost immediately with a message about an "Internal Error". There is no failed deployment created in CodeDeploy. I have configured CodePipeline with two inputs: the source code used to build the image a zip in S3 containing the appspec.yaml and the taskdef.json When

How to create change set for CloudFormation Template with Transform AWS::CodeDeployBlueGreen

左心房为你撑大大i 提交于 2021-02-11 10:00:56
问题 CloudFormation is failing to create a change set with status reason Template parameters modified by transform . This appears to be in reference to the AWS::CodeDeployBlueGreen transform applied to my template: AWSTemplateFormatVersion: '2010-09-09' Description: Stack Transform: - 'AWS::CodeDeployBlueGreen' # DEPLOYMENT HOOK Hooks: CodeDeployBlueGreenHook: ... This template contains all the resources required to run my application, including an ECS service with a task set which uses Blue/Green

AWS Fargate cannot access dockerized spring boot application over Load balancer/ public IP

好久不见. 提交于 2021-02-10 17:35:36
问题 I have deployed the docker image of my spring boot application over aws ECR, following creation of AWS fargate cluster. PFA screenshots of the configurations stating task, security, service and cluster definition.I can ping my public ip successfully. But I can't access my application over neither load balancer nor public ip. The urls I tried to access application were public_ip:8081/my_rest_end_point and load_balancer_public_dns:8081/my_reset_end_point I have tested running my docker image on

Fargate error: cannot pull container hosted in ECR from a private subnet

依然范特西╮ 提交于 2021-02-10 05:46:30
问题 I am trying to create a following architecture: a vpc with two subnets (one is public containing a NatGateway and an InternetGateway, and another one is private. I start a fargate service in a private subnet and it fails with this error: CannotPullContainerError: API error (500): Get https://XYZ.dkr.ecr.us-east-1.amazonaws.com/v2/: net/http: request cancelled while waiting for connection (Client.Timeout exceeded while awaiting headers) Here's my CloudFormation template (the service is

Fargate error: cannot pull container hosted in ECR from a private subnet

心不动则不痛 提交于 2021-02-10 05:46:29
问题 I am trying to create a following architecture: a vpc with two subnets (one is public containing a NatGateway and an InternetGateway, and another one is private. I start a fargate service in a private subnet and it fails with this error: CannotPullContainerError: API error (500): Get https://XYZ.dkr.ecr.us-east-1.amazonaws.com/v2/: net/http: request cancelled while waiting for connection (Client.Timeout exceeded while awaiting headers) Here's my CloudFormation template (the service is

Can I trigger an ECS/Fargate task from a specific file upload in S3?

主宰稳场 提交于 2021-02-09 02:44:10
问题 I know that I can trigger a task when a file is uploaded (per https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatch-Events-tutorial-ECS.html) however, how can I trigger a task when a specific file is uploaded? Amazon seems not to have anticipated people having multiple jobs watching the same bucket for different files :( 回答1: You can accomplish this with CloudWatch Events from CloudTrail Data Events. Head over to CloudTrail, and create a Trail for your account. For Apply trail