You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Serverless Application Repository (SAR) should support the use of custom macros within AWS Serverless Application Model (SAM) templates. Currently, SAR does not support the usage of existing macros which limits the flexibility and customization available to users deploying serverless applications.
When we attempt to publish the SAM template using either aws serverlessrepo create-application or sam publish, we encounter the following error: Error: Resource with name [Transform] is invalid. Provided Transform ['AWS::Serverless-2016-10-31', 'MyMacro'] is unsupported. Please use one of the following: ['AWS::Serverless-2016-10-31']
Use Case
We need to transform SAM templates to meet specific requirements that are unique to our operational needs and workflows. Custom macros allow us to automate and enforce these transformations, ensuring consistency, compliance, and efficiency. For instance, we may need to include custom resource definitions or apply specific configuration settings by using the parameter overrides provided by the user. We want to centralise and use the code across our AWS child accounts by leveraging SAR.
Proposed Solution
Integration with Existing SAM Macros: Ensure that SAR can seamlessly integrate with the existing macro functionality provided by SAM, allowing users to leverage their current macro implementations without modifications.
Documentation and Examples: Provide comprehensive documentation and examples demonstrating how to define, use, and troubleshoot custom macros within SAR. This would help users to quickly adopt the new feature and understand its benefits and limitations.
Other Information
No response
Acknowledgements
I may be able to implement this feature request
This feature might incur a breaking change
CLI version used
2.17.8
Environment details (OS name and version, etc.)
Mac OS X | macOS Sonoma
The text was updated successfully, but these errors were encountered:
ShanmugapriyanSP
changed the title
Support publishing SAM template to Serverless Application Repository (SAR) that leverages an existing macro
Feature request: Support publishing SAM template to SAR that leverages an existing macro
Jul 8, 2024
Thanks for the feature request. This is a limitation on the CloudFormation side, here is a related issue opened a while back: aws/serverless-application-model#859. I found an internal backlog item tracking this request. I'll add your +1 to that, and if you have any other details regarding your use that you want to add then please let me know. But support for this feature would need to be added on the CloudFormation side before the AWS CLI could support this. Also for issues involving the SAM CLI you can reach out here: https://github.com/aws/aws-sam-cli/issues.
This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
Describe the feature
The Serverless Application Repository (SAR) should support the use of custom macros within AWS Serverless Application Model (SAM) templates. Currently, SAR does not support the usage of existing macros which limits the flexibility and customization available to users deploying serverless applications.
When we attempt to publish the SAM template using either
aws serverlessrepo create-application
orsam publish
, we encounter the following error:Error: Resource with name [Transform] is invalid. Provided Transform ['AWS::Serverless-2016-10-31', 'MyMacro'] is unsupported. Please use one of the following: ['AWS::Serverless-2016-10-31']
Use Case
We need to transform SAM templates to meet specific requirements that are unique to our operational needs and workflows. Custom macros allow us to automate and enforce these transformations, ensuring consistency, compliance, and efficiency. For instance, we may need to include custom resource definitions or apply specific configuration settings by using the parameter overrides provided by the user. We want to centralise and use the code across our AWS child accounts by leveraging SAR.
Proposed Solution
Integration with Existing SAM Macros: Ensure that SAR can seamlessly integrate with the existing macro functionality provided by SAM, allowing users to leverage their current macro implementations without modifications.
Documentation and Examples: Provide comprehensive documentation and examples demonstrating how to define, use, and troubleshoot custom macros within SAR. This would help users to quickly adopt the new feature and understand its benefits and limitations.
Other Information
No response
Acknowledgements
CLI version used
2.17.8
Environment details (OS name and version, etc.)
Mac OS X | macOS Sonoma
The text was updated successfully, but these errors were encountered: