Using Cloudfront for posting data

0 votes
Hi all

I'm using AWS Cloudfront as a CDN config in my application.

I enabled all Http method: put, post, get,.... in configuration of S3 and Cloudfront.

Now I can post an object to CDN address: https://xxxxxxx.cloudfront.net with object key: profiles/1234556.jpg

But now I want post object to address: https://xxxxxxx.cloudfront.net/profiles/ with object key 1234556.jpg but it always return error 405: method not allowed, message: the specified method is not allowed against this resource

Can I do it? Has anyone done it yet??

Thanks a lot!!!
Sep 3, 2019 in AWS by iamdatvt
• 120 points
3,377 views
Hey! Can you show your CloudFront configuration?

1 answer to this question.

0 votes

The POST request must be done to the root URL ("/"). In the CloudFront settings, check the 'Default Root Object' setting. This value must be blank, and not index.html. I never had to set any CORS settings.

Hope this helped!!

To know more about Google Cloud, It is recommended to go for Google Cloud Certification training today.

Thank you!

answered Sep 3, 2019 by Lakshminarayan

Did you post any object to https:///xxxxx.cloudfront.net/attachments (or any subdirectory) successfully?

Here is my config and root value is blank.

Related Questions In AWS

+1 vote
3 answers

How to get ARN for s3 Bucket using aws cli .

An ARN is a non-opaque, constructible identifier, ...READ MORE

answered Aug 16, 2018 in AWS by Priyaj
• 58,090 points
4,983 views
0 votes
1 answer

AWS S3 pricing for data in/out.

All traffic from mobile phones to S3 ...READ MORE

answered Jul 6, 2018 in AWS by Priyaj
• 58,090 points
408 views
0 votes
1 answer
+1 vote
1 answer

How to load CSV data to RDS Aurora table using lambda?

Launch an Amazon RDS MySQL database engine ...READ MORE

answered Jul 26, 2018 in AWS by Priyaj
• 58,090 points
4,267 views
0 votes
1 answer
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP