aws-sam-cli icon indicating copy to clipboard operation
aws-sam-cli copied to clipboard

Unable to solve mapping for Timeout property

Open D-Jurado opened this issue 10 months ago • 3 comments

Description

I'm using a mapping function to set Timeout property for my Type: AWS::Serverless::Function, I'm not getting any error running sam build or sam validate but sam local start-lambda is throwing the following error:

Lambda functions containers initialization failed because of Invalid Number for Timeout: OrderedDict([('Fn::FindInMap', ['common', 'LambdaFunction', 'Timeout'])])

Steps to reproduce

This is the portion of my Cloudformation file where I'm using the map to set Timeout property

Mappings:
  common:
    LambdaFunction:
      Timeout: 900

Resources:
  myFunction:
    Type: AWS::Serverless::Function
    Properties:
      Timeout: !FindInMap [common, LambdaFunction, Timeout]

Observed result

Error log

Lambda functions containers initialization failed because of Invalid Number for Timeout: OrderedDict([('Fn::FindInMap', ['common', 'LambdaFunction', 'Timeout'])])

Expected result

Run lambda

Additional environment details

  1. OS: Windows 11
  2. If using the SAM CLI, sam --version: SAM CLI, version 1.115.0
  3. AWS region: us-east-1

D-Jurado avatar Apr 22 '24 23:04 D-Jurado

This issue is related to SAM CLI, I will transfer the issue to the correct repository.

moelasmar avatar Apr 23 '24 19:04 moelasmar

Hi @D-Jurado, Thanks for reporting the issue and providing an example. I was able to reproduce this issue. Marking it as a bug so the team can prioritize a fix

sidhujus avatar Apr 25 '24 20:04 sidhujus

Hi @D-Jurado, Thanks for reporting the issue and providing an example. I was able to reproduce this issue. Marking it as a bug so the team can prioritize a fix

Thank you!

D-Jurado avatar Apr 26 '24 14:04 D-Jurado

Patch is released in v1.122.0. Closing

github-actions[bot] avatar Aug 17 '24 04:08 github-actions[bot]