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

API Gateway resource in the template #70

Open
tommy-salman opened this issue Nov 12, 2023 · 2 comments
Open

API Gateway resource in the template #70

tommy-salman opened this issue Nov 12, 2023 · 2 comments

Comments

@tommy-salman
Copy link

Hello, and thanks for the solution.
Am I missing something regarding the API Gateway resource? Where does the value for "${ServerlessRestApi}" come from and where is the trigger for the function "RegisterNewMarketplaceCustomer" defined?

@electronicalias
Copy link

electronicalias commented Dec 27, 2023

Also puzzled by this. I assume this is an API that exists and has been created in the account this is being deployed to, so that the x-amzn-marketplace-token can be posted to it and added to the dynamo table...

const postUrl = `${baseUrl}subscriber`;

However one would ask, how does the template run if the "${ServerlessRestApi}" param hasn't been established in the template, either by a passed param, or through a Ref

@electronicalias
Copy link

Did some further research, uses Serverless Framework unfortunately, so no good for my project as it'd mean another deployment framework. I'm using Amplify, would mean more plugins.

In the template:

Transform: AWS::Serverless-2016-10-31

And I believe this is what deploys the API with those resource names, hence they can be referenced:
https://github.com/aws-samples/aws-marketplace-serverless-saas-integration/blob/053514144dab24c649003c33c64d339f732bf24f/template.yaml#L269C6-L274C25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants