Posts

Showing posts from July, 2023

AWS: S3 Tagging

Image
What is S3 Bucket? -- Amazon Simple Storage Service (S3) is a cloud-based storage service provided by AWS. It offers scalable, durable, and highly available object storage, making it a popular choice for various applications, from data backups and content distribution to big data analytics and application hosting. S3 operates on the concept of "buckets," which are containers for storing objects such as images, videos, documents, and other data types. Each object within a bucket is uniquely identified by a key and can be accessed through a URL. It supports various storage classes, allowing users to optimize costs based on data access patterns. These classes include Standard, Intelligent-Tiering, Infrequent Access, Glacier etc. -- To update or append tags in S3 bucket . Python code using the boto3 library to change tags for an object in an Amazon S3 bucket: import boto3 s3 = boto3.client("s3") new_tags = [     {'Key': 'Tag1', 'Value': 'Valu

AWS: CloudFront Distribution Viewer Policy

Image
What is CloudFront ? -- CloudFront is a content delivery network service provided by AWS. It helps deliver static and dynamic web content, including videos, images, and applications, to end-users with low latency and high transfer speeds. -- CloudFront uses a global network of edge locations to cache and serve content from the location closest to the end-user, reducing the distance and improving overall performance. It also offers features like SSL/TLS encryption, DDoS protection, and integration with other AWS services, making it a popular choice for accelerating content delivery across the globe. Example -- To change the CloudFront viewer policy using boto3 -- CloudFront Distribution Viewer Policy : CloudFront allows you to control access to your content by specifying a viewer policy. The viewer policy defines who can access your content based on various criteria such as IP address, HTTP headers, cookies, and more. It helps you restrict access and implement fine-grained access contro