Closed
Description
What were you trying to accomplish?
Use the provided sam example
Expected Behavior
Provided example should pass cfn-lint
and sam validate
Current Behavior
Copied example produces the following error:
Possible Solution
Fixes by PR #1117 deployed example at https://gyft.github.io/aws-lambda-powertools-python/latest/core/event_handler/appsync/#required-resources
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: Hello world event handler API Gateway
Globals:
Api:
TracingEnabled: true
Cors: # see CORS section
AllowOrigin: "'https://example.com'"
AllowHeaders: "'Content-Type,Authorization,X-Amz-Date'"
MaxAge: "'300'"
BinaryMediaTypes: # see Binary responses section
- '*~1*' # converts to */* for any binary type
Function:
Timeout: 5
Runtime: python3.9
Tracing: Active
Environment:
Variables:
LOG_LEVEL: INFO
POWERTOOLS_LOGGER_SAMPLE_RATE: 0.1
POWERTOOLS_LOGGER_LOG_EVENT: true
POWERTOOLS_METRICS_NAMESPACE: MyServerlessApplication
POWERTOOLS_SERVICE_NAME: my_api-service
Resources:
ApiFunction:
Type: AWS::Serverless::Function
Properties:
Handler: app.lambda_handler
CodeUri: api_handler/
Description: API handler function
Events:
ApiEvent:
Type: Api
Properties:
Path: /{proxy+} # Send requests on any path to the lambda function
Method: ANY # Send requests using any http method to the lambda function
Steps to Reproduce (for bugs)
- Copy yaml from REST API : Required resources
- Run
cfn-lint
Environment
- Powertools version used: N/A
- Packaging format (Layers, PyPi): N/A
- AWS Lambda function runtime: N/A
- Debugging logs
E0000 Null value at line 6 column 9
template.yaml:6:9