5 réponses
- Le plus récent
- Le plus de votes
- La plupart des commentaires
0
Difficult to find any issues in the ARN, however it might be malformed YAML file in this case. I can see an extra WHITESPACE in here: "Default: arn:aws:lambda:us-east-1:6666666666666:layer:myLayer:1". Can you try removing that just to rule it out?
répondu il y a un an
tried it without space as well.
0
That arn is only the default value for the parameter, you're not overriding it are you, e.g. with a space?
0
There you go a full example:
AppLambda:
Type: AWS::Lambda::Function
Properties:
FunctionName: !Sub ${EnvName}-${AWS::Region}-lambda-function-app
Description: !Sub APP API lambda function version ${AppLambdaVersion}
Code:
S3Bucket: !Ref SpecBucketName
S3Key: !Join ['', [ 'templates/lambda/app/', !Ref ContactLambdaVersion , '/zip/', !Ref EnvName , '-' , !Ref AWS::Region , '-', !Ref CommitSha, '-lambda-function-app.zip' ] ]
Handler: index.lambda_handler
Role:
Fn::GetAtt:
- LambdaAppCommonRole
- Arn
Runtime: nodejs12.x
TracingConfig:
Mode: Active
Timeout: 180
Layers:
- !Join [ '', [ 'arn:aws:lambda:', !Ref AWS::Region , ':' , !Ref AWS::AccountId , ':layer:lib-layer:24' ] ]
Environment:
Variables:
APP_VAR: myvalue
Tags:
- Key: Name
Value: !Ref AWS::StackName
- Key: Project
Value: !Ref ProjectName
- Key: Environment
Value: !Ref EnvName
répondu il y a un an
0
The following works for me with managed AWS layers, e.g.
Layers:
- arn:aws:lambda:eu-north-1:666666666666:layer:AWSSDKPandas-Python311:4
That would suggest it is caused by myLayer being unknown?
répondu il y a 4 mois
Contenus pertinents
- demandé il y a 6 mois
- demandé il y a un an
- demandé il y a 6 mois
- AWS OFFICIELA mis à jour il y a 3 ans
- AWS OFFICIELA mis à jour il y a un an
tried that , didn't work