sam warnings for non existent layer

0

sam build is spitting out weird warnings

WARNING: No BuildArchitecture specifed in Layer `None` Metadata. Defaulting to x86_64.

This is happening only for sam versions 1.104 and above. I have no idea what this is referring to since it is specifying layer 'None' even when there is no layer in the application. My code still seems to work but this is concerning. Can't specify metadata for something that doesn't exist.

  • After further work checking my applications, this issue seems to be related to external layers (layers defined in a separate template.yaml file). However, the number of warnings is always greater than the number of Lambdas in my template.yaml file even if not all the functions use the external layer. The external layer is built with the BuildArchitecture defined.

demandé il y a 5 mois107 vues
2 réponses
0
profile picture
répondu il y a 5 mois
profile picture
EXPERT
vérifié il y a un mois
0

This warning is indicating that the SAM build process is unable to determine the architecture (x86_64) for one of the layers in your SAM application.

This can happen for a few reasons:

There may be a layer defined in your template that does not have the "Architecture" property specified. The SAM build needs this to know which architecture to use.

There could be a bug in newer versions of the SAM CLI where it is incorrectly reporting this warning even when all layers are properly defined. As Yusuf pointed out, this is the case: https://github.com/aws/aws-sam-cli/issues/6444

profile picture
EXPERT
répondu il y a un mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions