AWS CloudWatch Logs Insights
Sample
#need to select a log group first. Like is case sensitive. Two filter is and logic
fields @timestamp, @message
|filter @message like "pay"
|filter @message like "POST"
|sort @timestamp desc
|limit 20
To add time range, use UT and pick absolute and then write down range. Need to pick UTC
AWS S3
Can store some public files in S3 and copy back to a Docker image
- Upload the file into AWS S3
- Edit permission to make it public
- Copy the url for this object
- Use curl to copy file in Dockerfile
RUN curl "https://my-assets.s3.us-west-2.amazonaws.com/good-assets/grpc.so" --output /usr/lib/php8/modules/grpc.so
Amazon Elastic Container Service (ECS)
ECS runs and manages docker-enabled applications in amazon EC2 instances.
Amazon EC2 container registry stores docker images.
To use ECS
- Create EC2 Cluster. These instances are linked in a virtual private cloud(VPC)
- Create task defintion to define a container. It is a configuration for running a docker image
- Deploy containers using task definition to run on the cluster
- Use Serive to manage tasks. Serice includes task defintion, desired count and task placement strategy
- Update Service with new task defintions to replace old tasks
No comments:
Post a Comment