Open WesleyCharlesBlake opened 6 years ago
Checkout my fork. It has a couple of issues resolved. Soon it won’t matter as you can use AWS Fargate (currently only available for US East)
I'd add to the issues that it discovers the ECS cluster name by parsing userdata and looking for text strings.
This has potential to go wrong when used in environments that may be bootstrapping other things in userdata and given that this example is used in a CFN script that also creates the ECS Cluster (e.g. the name's already known), this should be passed as an environment variable to the lambda function.
I'd add to the issues that it discovers the ECS cluster name by parsing userdata and looking for text strings.
Yes, I've run in to this issue, It fails to find the cluster name if the user data is gzip encoded.
The original bug report text in this issue is what I submitted to AWS support on 2018-02-26. Here is a pull request that addresses all of these issues: https://github.com/aws-samples/ecs-cid-sample/pull/23/files. The Lambda function in my new version is now small enough that I'm including it inline within the CloudFormation template so that there are no separate ZIP files to upload.
Brian
There is a large amount of unused code and variables in the in the code. The index.py file can be knocked down by half. #19 should resolve the unused variables.