aws-amplify / aws-amplify/amplify-cli

How to create the argument to pass to addCfnCondition

Open
#9,817 1 comment 0 reactions 0 assignees View on GitHub
extensibility feature-request p3
Dominant language
TypeScript
Stars
2.9k
Forks
825
Avg merge
11d 23h
Merged PRs (30d)
2

Description

> **Note**: If your question is regarding the AWS Amplify Console service, please log it in the
> [AWS Amplify Console repository](https://github.com/aws-amplify/amplify-console/issues)

**Which Category is your question related to?**
Override api gateway

**Amplify CLI Version**
7.6.21

**What AWS Services are you utilizing?**
Api gateway

**Provide additional details e.g. code snippets. _Be sure to remove any sensitive data._**
I'm trying to call `addCfnCondition` on the AmplifyApiRestResourceStackTemplate that I get in my api override. For this I understand that I need to build an object of type `ICfnConditionExpression` to pass as an argument. I did not find information about how to do that in the amplify documentation, but thought I had found it in `@aws-cdk` so I tried to import `@aws-cdk/core` and then use `Fn.conditionEquals` but I get `VMError: Cannot find module 'fs'` when trying to check out the environment.

How can I create the `ICfnConditionExpression` to pass to `addCfnCondition`?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.