Closed
Description
The CorsConfiguration
for AWS::Serverless::Api
includes the following properties:
AllowHeaders: String
AllowMethods: String
AllowOrigin: String <-- No S on the end of 'AllowOrigin'
The HttpApiCorsConfiguration
for AWS::Serverless::HttpApi
includes these properties:
AllowHeaders: List
AllowMethods: List
AllowOrigins: List <-- But this one does have one
If you switch from a REST API to HTTP API and retain the same CORS configuration, you will get an error from this line of code:
Invalid value for 'Cors' property.
This is a difficult error to figure out. I ended up having to read the source code.
If the property name can't be changed, it would at least be helpful to include the name of the invalid property in the error message as a clue.