Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expecting "int", got "string" on property Timeout on Lambda Function #50

Closed
yyolk opened this issue Aug 15, 2017 · 2 comments
Closed

Expecting "int", got "string" on property Timeout on Lambda Function #50

yyolk opened this issue Aug 15, 2017 · 2 comments

Comments

@yyolk
Copy link
Contributor

yyolk commented Aug 15, 2017

I'm receiving an error when providing a Timeout via a !Ref

The resource I'm receiving the error on:

 CustomAuthorizerLambdaFunction:
   Type: AWS::Serverless::Function
   Properties:
     CodeUri: ./code.jar
     Handler: someClass
     Runtime: java8
     Timeout: !Ref FunctionTimeout
     VpcConfig:
       SecurityGroupIds:
         - !Ref LambdaVPCSecurityGroup
       SubnetIds: !Ref Subnets
     MemorySize: 512
     Environment:
       Variables:
         REDIS_HOST: !Ref RedisHost
         REDIS_PORT: "6379"
         DEFAULT_DB_TIMEOUT: !Ref DBIdleTimeout
     Policies:
       - AWSLambdaVPCAccessExecutionRole
       - AWSXrayWriteOnlyAccess
     Tags:
       Department: engineering
       Application: customer-api
       Service: authorizer-processing

the error I receive:

ERROR: Resource "CustomAuthorizerLambdaFunction", property "Timeout": Expecting "int", got "string" (line: 278; col: 6)
@yyolk yyolk changed the title Expecting "int", got "string" Expecting "int", got "string" on property Timeout on Lambda Function Aug 15, 2017
@PaulMaddox
Copy link
Contributor

PaulMaddox commented Aug 15, 2017

Hi @yyolk,

Currently support for CloudFormation Intrinsic Functions is less than ideal in SAM Local (specifically the goformation library we're using to parse/validate SAM templates).

This is something we're working hard on improving (see the 0.1.0 branch of the goformation library that's currently in-progress, and specifically this proposal).

In the meantime, in order to use SAM Local with this template, you'll have to remove the !Ref intrinsic functions, and just replace them with integer values.

@sanathkr
Copy link
Contributor

Fixed in v0.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants