localstack / localstack/serverless-localstack
CREATE_FAILED: ApiGatewayMethodActionPost (AWS::ApiGateway::Method) - Invalid type for parameter selectionPattern
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 542
- Forks
- 92
- PR merge metrics
- No merged PRs in 30d
Description
I'm trying to deploy my serverless app on local stack but Invalid type parameter for selectionPattern error is being thrown. Below is the complete error and serverless.yml
Error:
ApiGatewayMethodActionPost (Parameter validation failed:; Invalid type for parameter selectionPattern, value: 200, type: <class 'int'>, valid types: <class 'str'>)
serverless.yml
events:
- http:
path: /action
method: POST
iamRole: arn:aws:iam::xxxxxxxxxxxx:role/someRole
action: StartSyncExecution
request:
template:
application/json: |
{
"stateMachineArn":"arn:aws:states:'us-west-2':xxxxxxxxxxxx:stateMachine:someMachine",
"input": "$util.escapeJavaScript($input.json('$'))"
}
response:
template:
application/json: |
$input.path('$.output')
I was checking serverless-step-function code where selectionPattern is defined as integer and not string. Following is the link to the code: code
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the serverless.yml configuration in the report and compare it with the linked serverless-step-functions lib/deploy/events/apiGateway/methods.js code at line 199. Reproduce the deployment against LocalStack, trace how selectionPattern is generated, and confirm the fix by verifying that the API Gateway method deploys without the parameter type error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, javascript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100