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

Feature request: Support publishing SAM template to SAR that leverages an existing macro #8786

Closed
2 tasks
ShanmugapriyanSP opened this issue Jul 8, 2024 · 3 comments
Assignees
Labels
feature-request A feature should be added or improved.

Comments

@ShanmugapriyanSP
Copy link

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 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

@ShanmugapriyanSP ShanmugapriyanSP added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jul 8, 2024
@ShanmugapriyanSP 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
@tim-finnigan tim-finnigan self-assigned this Jul 8, 2024
@tim-finnigan tim-finnigan added the investigating This issue is being investigated and/or work is in progress to resolve the issue. label Jul 8, 2024
@tim-finnigan
Copy link
Contributor

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.

Copy link

github-actions bot commented Jul 8, 2024

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.

@tim-finnigan tim-finnigan removed investigating This issue is being investigated and/or work is in progress to resolve the issue. needs-triage This issue or PR still needs to be triaged. labels Jul 8, 2024
@ShanmugapriyanSP
Copy link
Author

Thanks for the update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved.
Projects
None yet
Development

No branches or pull requests

2 participants