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

Unable to solve mapping for Timeout property #6975

Open
D-Jurado opened this issue Apr 22, 2024 · 3 comments
Open

Unable to solve mapping for Timeout property #6975

D-Jurado opened this issue Apr 22, 2024 · 3 comments
Labels
area/intrinsics Ref, If, Sub, GetAtt, ... area/local/start-lambda sam local start-lambda command type/bug

Comments

@D-Jurado
Copy link

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 D-Jurado added the stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. label Apr 22, 2024
@moelasmar
Copy link
Contributor

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

@moelasmar moelasmar transferred this issue from aws/serverless-application-model Apr 23, 2024
@moelasmar moelasmar added area/local/start-lambda sam local start-lambda command area/intrinsics Ref, If, Sub, GetAtt, ... labels Apr 23, 2024
@sidhujus
Copy link
Contributor

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

@D-Jurado
Copy link
Author

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!

@sidhujus sidhujus removed the stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. label Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/intrinsics Ref, If, Sub, GetAtt, ... area/local/start-lambda sam local start-lambda command type/bug
Projects
None yet
Development

No branches or pull requests

3 participants