How to install Datadog agent in AWS lambda - aws-lambda

We want to collect metrics from machines running AWS lambda in AWS. How can I get access to these machines and get DD agent installed on them.

Lambda is serverless. Datadog agent is for the host. While running lambda you have absolutely no control over the host as you are not managing it.
Hence, You can monitor application running on lambda using datadog integration of lambda for the different application.
You may follow below link for AWS Integration of datadog.
Ref: https://docs.datadoghq.com/integrations/amazon_lambda/

Related

How to get aws ec2 centralized logs using some third party integration

I want to get logs from ec2 machines using some agent. I don't want to use cloudwatch for this. Is there any solution for this?

Launch EMR cluster via Lambda inside a VPC using boto3

I am trying to launch an EMR cluster using AWS Lambda code written with boto3 and python. The Lambda is able to launch the cluster when there is no VPC configuration associated it. However, as soon as I add the VPC config it fails to launch the cluster and errors out and does not provide any error message.
I am trying to launch the lambda inside a default VPC and it has 3 public subnets and a default security group. I have checked the route table in the VPC is associated with an internet gateway and it is attached to the VPC.
The execution role provides full access to the cloudwatch elasticmapreduce and ec2 actions.
Any help in resolving this school boy error will be much appreciated.

JMeter master slave setup on AWS

I want to setup a 3 node cluster for JMeter on AWS EC2 instances.
I am not able to find any reference. Can anybody guide it
AWS EC2 instances don't differ from any other computers so you can follow instructions from Remote Testing guide.
Just make sure to unblock the following ports in AWS Security Groups
1099
the port you define as server.rmi.localport
the port(s) you define as client.rmi.localport
References:
Remote hosts and RMI configuration
How to Perform Distributed Testing in JMeter
You may also find JMeter ec2 Script useful
You may refer to this AWS CDK based framework for running Jmeter tests in distributed mode on AWS (FARGATE/ECS using Jmeter Docker containers)
https://github.com/pranavkakde/aws-cdk-load-test-jmeter

AWS lambda function to restart one of the ECS cluster service

We are deploying multiple service in ECS cluster with fargate, On the front end we are using nginx service. On the backend some services are getting deployed frequently. Once any of the backend service deployed we manually need to update nginx service forcefully. Do we have any approach to update only nginx service forcefully when any of the new service deployed successfully?
How we can achieve this ? using lambda or cloudwatch....
Any help is appreciated, Thanks in advance
When the backend Services are updated you can use cloud watch to trigger a lambda. This lambda can use the AWS SDK to to restart the Nginx container service/task. You could also version your Nginx container along with all your backend services so that that the a new Nginx image is push up when your backend changes and the task definition is changed contains the new image. Providing your using AWS ECS Service it can update it self.
See here for more information: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/update-service.html

Launching ECS service from our own AMI

I am trying to deploy my sample Spring Cloud Microservice into AWS ECS service. I found that Fargate method and EC2 launch method. Here actually I am looking for to launch ECS service from my own EC2 instance. Now I have only Ubuntu 16.04 AMI. I am planning to use AWS ECS optimized AMI as my EC2. So I need to launch ECS using my own EC2. So I am confused about the launching by optimized my own EC2.
I am seeking useful links or documentation for launching using above method. Since I am beginning stage on AWS Cloud.
The AMI you've configured for your instance doesn't matter (generally). Once your EC2 instance is created, go over to the ECS section of AWS and create a cluster containing your host.
In ECS you need to define a task containing your container, the repo to pull it from, and all the other necessary details. From here you can go to your cluster and launch your task on your host, either manually, or by defining a service to automate the launching for you.

Resources