commercetools / merchant-center-application-kit

Tools and components for developing Merchant Center Customizations 🛠
https://docs.commercetools.com/merchant-center-customizations
MIT License
66 stars 27 forks source link

[docs] Request deployment example for AWS Lambda #2692

Closed Nadeera-Gayashan closed 1 year ago

Nadeera-Gayashan commented 2 years ago

Where would you like to deploy your Custom Application? AWS

Additional context Can I call commercetools Composable Commerce APIs from AWS Lambda function? If so, please provide an example

Rhotimee commented 2 years ago

Hello @Nadeera-Gayashan, could you describe what you're trying to achieve and how this relates to the Custom Applications?

Nadeera-Gayashan commented 2 years ago

Hello @Rhotimee,

Please refer to the below instance.

  1. I need to call an external Graphql API hosted at AWS Lambda function, using a custom application
  2. This Graphql API need to get data from commercetools using composable commerce API

I need to know how I call composable commerce APIs from AWS Lambda function.

Thanks & BR, Nadeera

Rhotimee commented 2 years ago

Hi @Nadeera-Gayashan,

From what we understand, it seems like you are looking to use the /proxy/forward-to endpoint to integrate with your own API. This allows you to securely authenticate your Custom Application with your external API.

From your GraphQL API is then up to you to securely connect to the Composable Commerce APIs. Usually, this is done using an API client.

In case this is not what you were looking for, could you maybe share more details about your use case and requirements? Thanks

Nadeera-Gayashan commented 2 years ago

Hi @Rhotimee,

Thank you for the quick response.

I need to write a Lambda function which can call to commercetools API (just assume to get the product list). That is my requirement.

I need some guide/examples to study about how to write that mentioned Lambda function.

Thanks & BR, Nadeera

Rhotimee commented 2 years ago

Hello @Nadeera-Gayashan,

If you're only trying to access the commercetools API from the Custom Application, you can do that directly without a lambda function. You can get more information from the MC-API docs. Also, you can get more information from the docs for the product API.

However, if that's not what you want to achieve, we will need more information about your use case to provide some help.
Thanks.

github-actions[bot] commented 2 years ago

This issue has been marked as 'stale' due to its inactivity for the last 14 days. Please, add a new comment to keep the conversation going; otherwise, the issue will be closed in two weeks.

github-actions[bot] commented 1 year ago

This issue has been closed due to its inactivity for the last month. Please, feel free to reopen it and add a new comment in case you think the problem has not been resolved.