I am hosting micro-frontends on S3 behind Cloudfront. I do not want people to access static files through direct URL. I was looking for solution and found we can protect through access token which can be validated by Lambda@Edge. I don't want Lambda@Edge to check if user is authenticated for each file as there will be multiple static files used by actual website and for each file if Lambda validates the token, it will become slow.
How to restrict user to directly access static files hosted on Cloudfront
165 Views Asked by user2579720 At
1
There are 1 best solutions below
Related Questions in REACTJS
- ussd reader in Recket Native module
- Teams tab application returns SSO error in mobile Outlook
- Github Pages Deployment deploys a blank page
- Is there any way to glow this bulb image like a real light bulb
- Optimize LCP ReactJs
- Page in React only renders elements after refreshing
- Unable to Post Form Data to MongoDB because of picturepath
- MERN Stack App - User Avatar Upload - 500 Error After Deployment on Render
- Hooks are not supported inside an async component error in nextjs project using useQuery
- How to change the Font Weight of a SelectValue component in React when a SelectItem is selected?
- On the server side, it returns undefined but on the client side, logs the values no problem
- Multilevel dropdown with checkboxes in Select component
- TypeScript Error only on big type only when assigned to a variable
- Deployment through app engine, cloud sql database, problem connecting with server code, doesn't connect
- Data is not filtering in props. Showing passdata.map is not a function
Related Questions in AMAZON-WEB-SERVICES
- S3 integration testing
- How to get content of BLOCK types LAYOUT_TITLE, LAYOUT_SECTION_HEADER and LAYOUT_xx in Textract
- Error **net::ERR_CONNECTION_RESET** error while uploading files to AWS S3 using multipart upload and Pre-Signed URL
- Failed to connect to your instance after deploying mern app on aws ec2 instance when i try to access frontend
- AWS - Tab Schema Conversion don't show up after creating a Migration Project
- Unable to run Bash Script using AWS Custom Lambda Runtime
- Using Amazon managed Prometheus to get EC2 metrics data in Grafana
- AWS Dns record A not navigate to elb
- Connection timed out error with smtp.gmail.com
- AWS Cognito Multi-tenant Integration | Ok to use Client’s Idp?
- Elasticbeanstalk FastAPI application is intermittently not responding to https requests
- Call an External API from AWS Lambda
- Why my mail service api spring isnt working?
- export 'AWSIoTProvider' (imported as 'AWSIoTProvider') was not found in '@aws-amplify/pubsub'
- How to take first x seconds of Audio from a wav file read from AWS S3 as binary stream using Python?
Related Questions in AMAZON-CLOUDFRONT
- How to set custom Origin Name in AWS CDK for CloudFront
- Switch to Cloudfront CDN causing issues for small number of users
- How can I reconfigure CodeIgniter (v4) to serve with a new sub-directory path (via nginx)?
- Cross account origin change in lambda edge
- CloudFront Not Using SimpleCORS Policy
- Hosting multiple static sites programmatically
- Cant retrieve headers from network source type "Fetch/Redirect"
- Miss From Cloudfront: X-cache
- Custom Header from Network Request not being retrieved with fetch API
- Issues in connecting AWS Cloudfront to app hosted on AWS Elastic beanstalk
- JavaScript function not updating value after a while loop
- I am getting net::ERR_SSL_PROTOCOL_ERROR when my frontend that is running on AWS s3 bucket with cloudfront try to connect my backend on EC2 server
- Triggering lambda edge in Cloudfront origin response flow only for specific files
- Why does puppeteer timeout from lambda when calling a cloud front url?
- Use custom url with S3 uploads plugin for wordpress to AWS cloudfront
Related Questions in MICRO-FRONTEND
- How to fetch latest UI changes if the container is updated without refreshing the browser
- Basic microfrontend
- How to update remote module without refreshing the window in Angular module federation
- Webpack loading remote module on an incorrect endpoint
- Angular esbuild @angular/compiler missing from bundle file
- Is it possible to consume a Vue.js app as a microfronted in a React.js app?
- Share a service instance between multiple microfrontends in Angular
- Angular Micro-frontend Issue: GET http://localhost:4202/remoteEntry.js?v=3.3.4 net::ERR_FAILED 404 (Not Found)
- Microfrontend Fixing Conflicting styles issue
- Microfrontend implementation where the host is Vue and the remote component is React
- Sharing State between MonoRepo and MicroFrontEnd
- Load remote modules into a shell App and display them side by side
- Implement PWA Root application In Micro-Frontend
- ModuleFederation with react - not able to load multiple remotes into main
- How to Call Vue component inside React Micro Frontend using WebPack 5
Related Questions in AWS-LAMBDA-EDGE
- Cross account origin change in lambda edge
- Are key case sensitive in request.header.host in lambda edge function (nodejs16.x)
- Triggering lambda edge in Cloudfront origin response flow only for specific files
- Include CloudFront-Viewer-Country in the AWS Cloudfront logs
- How to use nodejs request module inside AWS Lamda Edge function
- Gatsby Functions - How can I deploy gatsby functions that works like express-style functions to s3 and cloudfront?
- Lambda@Edge Does Not See the `Authorization` Header
- How do I organise my CloudFront Behaviors to serve the correct SPA app when using separate buckets for a path based app
- AWS CloudFront and Lambda@Edge return 403
- Lambda@Edge with Cognito Authentication Fails for Subpaths in CloudFront-S3 Setup
- Lambda Edge Function trigger is getting removed automatically
- Lambda Edge returns html page instead of json
- How do I refresh a lambda after changing a config option
- Changing Host in LambdaEdge for an Origin-Request is forbidden
- can i use a cloudfront function to change url in the behaviour path pattern
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You can use signed cookies approach to protect all restricted content on your CloudFront distribution. Your application will need to set the cookie once and then pass it as headers to all requests to CloudFront. See official docs for details.
Lambda@Edge approach can also work in your case as it does not need to be slow. If you have multiple resources, they can be retrieved in parallel, so latencies should not compound.