Parameters: SomeParameter: Type: String Default: param SomeOtherParameter: Type: String Default: otherparam Resources: MinimalFunction: Type: AWS::Serverless::Function Properties: CodeUri: s3://sam-demo-bucket/hello.zip Handler: hello.handler Runtime: python2.7 FunctionWithTracing: Type: AWS::Serverless::Function Properties: CodeUri: s3://sam-demo-bucket/hello.zip Handler: hello.handler Runtime: python2.7 Tracing: Active FunctionWithInlineCode: Type: AWS::Serverless::Function Properties: InlineCode: hello world Handler: hello.handler Runtime: python2.7 Tracing: Active FunctionWithCodeUriObject: Type: AWS::Serverless::Function Properties: CodeUri: Bucket: somebucket Key: somekey Version: '1' Handler: hello.handler Runtime: python2.7 CompleteFunction: Type: AWS::Serverless::Function Properties: FunctionName: MyAwesomeFunction CodeUri: s3://sam-demo-bucket/hello.zip Handler: hello.handler Runtime: python2.7 Description: Starter Lambda Function Timeout: 60 VpcConfig: SecurityGroupIds: - sg-edcd9784 SubnetIds: - subnet-9d4a7b6c - subnet-65ea5f08 - {Ref: SomeParameter} - {Ref: SomeOtherParameter} Role: arn:aws:iam::012345678901:role/lambda_basic_execution Environment: Variables: Name: Value Name2: Value2 FunctionWithPolicies: Type: AWS::Serverless::Function Properties: CodeUri: s3://sam-demo-bucket/hello.zip Handler: hello.handler Runtime: python2.7 Policies: AmazonDynamoDBFullAccess FunctionWithPolicyDocument: Type: AWS::Serverless::Function Properties: CodeUri: s3://sam-demo-bucket/hello.zip Handler: hello.handler Runtime: python2.7 Policies: Statement: - Action: [dynamodb:*] Effect: Allow Resource: '*' FunctionWithRoleRef: Type: AWS::Serverless::Function Properties: CodeUri: s3://sam-demo-bucket/hello.zip Handler: hello.handler Runtime: python2.7 Role: Fn::GetAtt: [MyFunctionRole, Arn] MyFunctionRole: # This is just some role. Actual role definition might be wrong Type: AWS::IAM::Role Properties: AssumeRolePolicyDocument: Version: '2012-10-17' Statement: - Effect: Allow Principal: Service: - ec2.amazonaws.com Action: - sts:AssumeRole Path: / Policies: - PolicyName: root PolicyDocument: Version: '2012-10-17' Statement: - Effect: Allow Action: '*' Resource: '*'