Posts

AWS EventBridge

Image
 AWS Eventbridge AWS EventBridge -  Extention of CloudWatch => Events Event buses types -  Default event bus - events from AWS services are sent to this Partner event bus - receive events from external SaaS Application Custom event bus - for your own application Event rules - how to processs the events  Event buses support cross-account access Cron Jobs - when creating an EB rule, we can select "schedule" instead of event pattern to trigger an event based on a cron expression Can archieve events (all or based on a filter ) sent to an event bus to replay later  EventBridge is recommended for decoupling application that reacts to events from third-party SaaS applications   Schema Registry -  Defines how the data is structured in the event bus  Schema can be versioned  Event Bus Policy -  Manage permission for an event  Useful to allow or deny events from another AWS account or region

AWS Kinesis

Image
 AWS Kinesis AWS Kinesis -  Real-time data steaming service  Used in digest data in real time directly from source  Capacity Modes -  Provisioned - Publishing - 1mb/s per shard or 1000 msg/s per shard  Consuming -  2mb/s per shard (throughput shared between all consumer) Enhanced Fanout - 2mb/s per shard consumer (dedicated throughput for each consumer ) Throughput scales with shards (manual scaling) Pay per shard provisioned per hour  On-demand -  No need to provision or manage the capacity  Default capacity provisioned - 4mb/s or 4000 record/s Scales automatically based on observed throughput peak during the last 30 days  Pay per stream per hour and data in/out per GB g Not serverless Data retention: 1day (default) to 365 days A record consist of a partition key ( used to partition data coming from multiple publisher) and data blob (max 1mb) Record will be ordered in each shard  Producers SDK, kinesis producer library (KPL), ...

AWS SNS

Image
 AWS SNS AWS SNS -  Used to broadcast messages Pub-sub model (publisher publishes messages to a topic, subscribers listen to the topic) Instant message delivery (does not queue messages) Encryption -  In-flight encyption by default using HTTPS API At-rest encyption using KMS keys Client-side encryption Access Management -  IAM policies to regulate access to the SNS API SNS Access Policies (resource based policies) Used for cross-account access to SNS topic Used for allowing other AWS services to publish to an SNS topic  Standard Topics -  Highest throughput  At least once message delivery  Best effort ordering  Subscibers can be - SQS queues HTTP/HTTPS endpoints Lamda function Emails (using SNS) SMS and mobile notification Kinesis Data Firehouse to send the data into S3 or Redshift Fifo Topics -  Guaranteed  ordering of messages in that topic  Publishing messages to a fifo topic reqiures -  Group ID - messages will be orde...

AWS SQS

Image
 AWS SQS AWS SQS -  Used to asychronously decouple application  Suppports multiple producers and consumers  The consumer polls the queue for messages. Once a consumer processes a messages, it deletes it from the queue using DeleteMessage API Unlimited number of messages in queue Max 10 messages recieved per batch (configured using MaxNumberOfMessages parameter in the ReceiveMessage API) Max message size - 256kb  Consumers could be EC2 instances or Lamda function SQS cannot ingest data, it must be sent to the queue by the producer (use kinesis - kinesis data stream kds instead) Queue Types -  Standard queue -  Unlimited throughput (publish any number of message per second into the queue) Low latency (<10 ms on publish and recieve) Can have duplicate messages (at least once delivery) Can have out of order messages (best effort ording) Fifo queue - Limited throughput -  300 msg/s without batching (batch size=1) 3000 msg/s withour batching (batch s...

AWS Config

Image
 AWS Config AWS Config -  Regional service Can aggregated across regions and accounts Record Configuration changes over time Evaluate compliance of resources using config rules Does not prevent non-complaint actions from happening  Evaluate config rules -  For each config changes  At regular time intervals Can make custom config rules (must be define in lamda function) such as -  Check if EBS disk is of type gp2  Check if each Ec2 instance is t2.micro Can be used along with CloudTrail to get timeline of changes in configuration and complaince overtime Integrates with EventBridge or SNS to trigger notifications when AWS resources are non-compliant Remediation -    Automate remediation of non-compliant resources using SSM automation documents  You can set remediation retries if the resource is still non-complaint For Ex- If IAm access keys expires (non-compliant), trigger an auto-remediation action to revoke unused IAM user credentials...

AWS CloudTrail

Image
 AWS CloudTrail AWS CloudTrail -  AWS CloudTrail is a web service that records activity made on your account  A cloudtrail trail can be treated which delivers log files to an S3 bucket CloutTrail is about logging and saves a history of API calls for your AWS account Provides governance, compliance, and operational and auditing of your AWS account  Enabled by default Records the API calls made within the AWS account  Event Retention- 90days CloudTrail logs up to the last 90 days can be analyzed in Cloudtrail console. Older logs should be present in S3 and can be analyzed using athena modification to logs files can be Detected by enabling Log File Validation on the logging bucket  Event Types -  Managment Events -  Events of operation that modifies AWS resources like creating IAM user, deleting subnet  Enabled by default  Can saperate read events from write events  Data Events -  Events of operation that modify data like Lamda fu...

AWS CloudWatch

Image
 AWS CloudWatch AWS CloudWatch -  AWS CloudWatch is a monitoring service for AWS cloud resources and the application you run on AWS CloudWatch is is to collect and track metrics, collect and monitor log files, and set alarms CloudWatch alarms monitor metrics and can be configured to automatically initiate actions CloudWatch logs centralizes logs from systems, applications, and AWS Services CloudWatch events delivers a stream of system events that describe and changes in AWS resources CloudWatch is serverless performance monitoring service  CloudWatch integrates with AWS IAM Metrics -  Metrics are the fundamental concept in CloudWatch  A metrics represents a time-ordered set of data points that are published  Up to 30 dimensions per metrics Dimension in an attribute to the metrics Metrics exist within a region Metrics cannot be deleted but automatically expire after 15 months Custom Metrics -  You can publish your own metrics to CloudWatch using the AWS...