amazon-ecs

ECS with Terraform

荒凉一梦 提交于 2020-07-23 06:20:07
问题 Is there a good / definitive reference or course for managing a ECS service using Terraform. I have referred this which creates the ECS Service, but I can't get to a state where my task runs on that cluster. Here is what I have for now: # create the VPC resource "aws_vpc" "vpc" { cidr_block = var.cidr_vpc instance_tenancy = var.instanceTenancy enable_dns_support = var.dnsSupport enable_dns_hostnames = var.dnsHostNames tags = { Name = "tdemo" } } # Create the Internet Gateway resource "aws

ECS with Terraform

岁酱吖の 提交于 2020-07-23 06:19:08
问题 Is there a good / definitive reference or course for managing a ECS service using Terraform. I have referred this which creates the ECS Service, but I can't get to a state where my task runs on that cluster. Here is what I have for now: # create the VPC resource "aws_vpc" "vpc" { cidr_block = var.cidr_vpc instance_tenancy = var.instanceTenancy enable_dns_support = var.dnsSupport enable_dns_hostnames = var.dnsHostNames tags = { Name = "tdemo" } } # Create the Internet Gateway resource "aws

ECS with Terraform

妖精的绣舞 提交于 2020-07-23 06:17:56
问题 Is there a good / definitive reference or course for managing a ECS service using Terraform. I have referred this which creates the ECS Service, but I can't get to a state where my task runs on that cluster. Here is what I have for now: # create the VPC resource "aws_vpc" "vpc" { cidr_block = var.cidr_vpc instance_tenancy = var.instanceTenancy enable_dns_support = var.dnsSupport enable_dns_hostnames = var.dnsHostNames tags = { Name = "tdemo" } } # Create the Internet Gateway resource "aws

ValidationError Stack:arn aws cloudformation stack is in ROLLBACK_COMPLETE state and can not be updated

僤鯓⒐⒋嵵緔 提交于 2020-07-14 05:28:30
问题 When I deploy using cloudformation aws cloudformation deploy --region $region --stack-name ABC Got error: An error occurred (ValidationError) when calling the CreateChangeSet operation: Stack:arn:aws:cloudformation:stack/service/7e1d8c70-d60f-11e9-9728-0a4501e4ce4c is in ROLLBACK_COMPLETE state and can not be updated. Please help me ! 回答1: This happens when stack creation fails. The stack will remain in place with a status of ROLLBACK_COMPLETE (unless you've specified that it shouldn't be

How to use python ElasticSearch package with ECS Instance Role instead of passing credentials?

别等时光非礼了梦想. 提交于 2020-07-10 10:29:38
问题 I've built an app that queries ElasticSearch at various times. Now that I'm moving the app to be hosted on a ECS, I want to switch my queries to be based on the Instance Role permissions rather than credentials that I've been passing as environment variables. Based on the docs, if I pass no credentials to Boto3, I ought to get use my Instance Role. But in order to send my query using the ElasticSearch package in python, I have to pass credentials. Is there a way to do this using Instance

How can an ECS task know in which region is runs?

落花浮王杯 提交于 2020-07-09 14:58:42
问题 I have a python application using boto3 in a task launched by ECS (in a docker container). The boto3 command I use need a region to work properly, but I only know the region at runtime (multi-region application). The idea was then to define the AWS_DEFAULT_REGION environment variable by retrieving the region in the dynamic document provided by Amazon from URI http://169.254.169.254. However, whereas the call works fine from the instance, I cannot access the endpoint from within the task