Currently my serverless.yml file looks like this:
service: aaaaa
provider:
name: aws
runtime: go1.x
stage: mydev
resources:
Resources:
MyManagedPolicy:
Type: AWS::IAM::ManagedPolicy
Properties:
Description: This is my custom managed policy
PolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
Action: s3:GetObject
Resource: '*'
When I run "sls deploy" command, I am getting following error:
Error:
An error occurred: MyManagedPolicy - Syntax errors in policy. (Service: AmazonIdentityManagement; Status Code: 400; Error Code: MalformedPolicyDocument; Request ID: a20aa12c-fbaf-4301-bd20-b0148426f633).
Can you please point out the syntax error? I am new to serverless so not able to understand.
If possible please suggest the working serverless.yml