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 in AWS by iamdatvt
• 120 points
129 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.
answered Sep 3 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
• 57,300 points
1,687 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
• 57,300 points
65 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
• 57,300 points
1,520 views
0 votes
1 answer