Ac PR9 21dit013
Ac PR9 21dit013
Ac PR9 21dit013
PRACTICAL: 9
AIM:
Implementing CloudFront for Caching and Application Security.
THEORY:
Amazon CloudFront is a content delivery network (CDN) service that accelerates the delivery
of web content to users globally by caching data at edge locations. It enhances both
performance and security for applications by reducing latency and offering integrated security
features like DDoS protection and secure data encryption.
Below are the key aspects of implementing CloudFront for caching and application security:
DEPSTAR-IT Page 1
21DIT013 IT442: AC
OUTPUT:
Fig 9.1 Verify that the AWS CloudFormation stack creation process for the lab has successfully
completed
DEPSTAR-IT Page 2
21DIT013 IT442: AC
Fig 9.4 Upgrade the version of Python and the AWS CLI
Fig 9.5 verify the version of AWS and SDK for Python is installed
DEPSTAR-IT Page 3
21DIT013 IT442: AC
Fig 9.8 Configure the Cache key and origin requests settings.
DEPSTAR-IT Page 4
21DIT013 IT442: AC
DEPSTAR-IT Page 5
21DIT013 IT442: AC
DEPSTAR-IT Page 6
21DIT013 IT442: AC
DEPSTAR-IT Page 7
21DIT013 IT442: AC
Fig 9.17 Add a rule to the web ACL configuration to allow requests from the office IP set.
DEPSTAR-IT Page 8
21DIT013 IT442: AC
Fig 9.18 Update the new web ACL rule to block any requests that don't match the rule.
Fig 9.19 Set the rule priority, configure metrics, and create the web ACL.
DEPSTAR-IT Page 9
21DIT013 IT442: AC
Fig 9.20 Confirm that the web ACL configuration has been applied to the CloudFront distribution.
Fig 9.21 Test the AWS WAF configuration that was applied to the CloudFront distribution.
DEPSTAR-IT Page 10
21DIT013 IT442: AC
Fig 9.23 Create a regional web ACL, Add a rule, Update the new web ACL rule, Set the rule priority,
configure metrics, and create the web ACL
DEPSTAR-IT Page 11
21DIT013 IT442: AC
DEPSTAR-IT Page 12
21DIT013 IT442: AC
DEPSTAR-IT Page 13
21DIT013 IT442: AC
DEPSTAR-IT Page 14
21DIT013 IT442: AC
Fig 9.30 Publish the CloudFront function, and associate it with the CloudFront distribution.
DEPSTAR-IT Page 15
21DIT013 IT442: AC
Fig 9.32 Confirm the cache settings that are in place on the café website.
DEPSTAR-IT Page 16
21DIT013 IT442: AC
Fig 9.34 Edit the Cache-Control header set on each object in the S3 bucket.
Fig 9.35 Test the effects of updating the caching settings on the CloudFront origin (the S3 bucket).
DEPSTAR-IT Page 17
21DIT013 IT442: AC
Fig 9.36 Wait 3 minutes, and then test again and Notice that x-cache now says RefreshHit from
cloudfron
LATEST APPLICATIONS:
• Live Streaming: Low-latency delivery of live and on-demand video content.
• Real-Time Apps: Accelerates gaming, video conferencing, and IoT services.
• Serverless: Integrates with Lambda@Edge for serverless computing at the edge.
• PWAs: Speeds up Progressive Web Applications with resource caching.
• API Acceleration: Improves API performance by caching frequently accessed data.
• Secure Delivery: Ensures secure content delivery with encryption, WAF, and DDoS
protection.
• AI/ML at the Edge: Enables real-time inference for AI/ML applications at edge
locations.
LEARNING OUTCOME:
I learned how to set up a CloudFront distribution to improve global content delivery and
securely manage S3 bucket access using Origin Access Identity (OAI) and updated bucket
policies. I also gained experience in configuring AWS WAF IP sets and ACLs to restrict access
during development, and successfully associated them with CloudFront and API Gateway.
Additionally, I learned how to create and integrate CloudFront functions to modify requests at
the edge and optimize caching by updating S3 cache-control headers, improving overall content
delivery performance.
REFERENCE:
1. https://awsacademy.instructure.com/courses/85538
DEPSTAR-IT Page 18