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

Cannot Remove Environment Variable from Lambda #7777

Closed
4 tasks done
hisham opened this issue Jul 22, 2021 · 10 comments
Closed
4 tasks done

Cannot Remove Environment Variable from Lambda #7777

hisham opened this issue Jul 22, 2021 · 10 comments
Assignees
Labels
bug Something isn't working functions Issues tied to the functions category referenced-in-release Issues referenced in a published release changelog

Comments

@hisham
Copy link
Contributor

hisham commented Jul 22, 2021

Before opening, please confirm:

  • I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
  • I have searched for duplicate or closed issues.
  • I have read the guide for submitting bug reports.
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

How did you install the Amplify CLI?

npm

If applicable, what version of Node.js are you using?

14.15.3

Amplify CLI Version

5.1.2

What operating system are you using?

Mac

Amplify Categories

function

Amplify Commands

update

Describe the bug

I added an environment variable via amplify function update, now I try to remove it via amplify function update. On push I get following error:

UPDATE_FAILED functionMyrFn AWS::CloudFormation::Stack Wed Jul 21 2021 23:01:50 GMT-0600 (Mountain Daylight Time) Parameters: [myEnvVar] must have values

Expected behavior

Should remove env var succesfully

Reproduction steps

  1. Add env var to function via amplify function update
  2. amplify push
  3. Remove env var via amplify function update
  4. amplify push

GraphQL schema(s)

# Put schemas below this line

Log output

# Put your logs below this line


Additional information

No response

@hisham
Copy link
Contributor Author

hisham commented Jul 22, 2021

To get it to work I had to manually remove the following from the MyFn-cloudformation-template.json parameters list:

,
"myEnvVar": {
"Type": "String"
}

@hisham
Copy link
Contributor Author

hisham commented Jul 22, 2021

But when I switched to another env, amplify push on that env failed. Turned out I had to remove another instance from myEnvVar from my team-provider-info.json and then things worked.

So from my perspective removing env vars from lambdas via amplify cli is completely broken.

@SwaySway SwaySway added functions Issues tied to the functions category pending-triage Issue is pending triage labels Jul 22, 2021
@SwaySway
Copy link
Contributor

SwaySway commented Jul 22, 2021

Hello @hisham
Did you add the env variable with a prior version and remove it with version 5.1.2?
I was not able to repro using 5.1.2 I was able to add and remove a env variable.

@SwaySway SwaySway added the pending-response Issue is pending response from the issue author label Jul 22, 2021
@hisham
Copy link
Contributor Author

hisham commented Jul 23, 2021

yeah I added it with 5.1.1 and removed with 5.1.2.

@SwaySway SwaySway removed the pending-response Issue is pending response from the issue author label Jul 26, 2021
@josefaidt
Copy link
Contributor

Hey @hisham 👋 thanks for raising this! I've been able to reproduce in 5.1.2 and the latest version 5.2.0 as well. This appears to specifically affect environment variables and not secrets. After running amplify pull --restore the function does not show environment variables configured, but shows the env var and asks us for the value on a subsequent push. Marking this as a bug

Reproduction steps:

  1. amplify add function, add sample env var
  2. amplify push
  3. amplify update function, remove sample env var
  4. amplify push
  5. Observe error shown in this issue
  6. amplify pull --restore
  7. Make some update (example: add a secret to existing function)
  8. amplify push
  9. Observe the following prior to CLI pulling backend env from cloud
 > amplify push -y

 Some Lambda function environment variables are defined but missing values.

 ? Enter the missing environment variable value of my_sample_var in 7777removinglambdaenb40fa2f1: mysamplevalue

@josefaidt josefaidt added bug Something isn't working and removed pending-triage Issue is pending triage labels Jul 29, 2021
@josefaidt josefaidt removed their assignment Jul 29, 2021
akshbhu pushed a commit to akshbhu/amplify-cli that referenced this issue Aug 15, 2021
… variable (aws-amplify#7917)

cloudformation-template.json file has the env variable in camel case format, so env variable
deletion should look for camel case version of the variable name

fix aws-amplify#7777
@mariusbutuc
Copy link

Removing λ-function environment variables is still buggy in @aws-amplify/[email protected].

It will likely be fixed when *5.3.1 is out, as it contains #7917.

akshbhu added a commit that referenced this issue Aug 20, 2021
* fix(amplify-category-auth): check for siwa Cognito idp params (#7678)

Need to check for siwa params because privateKey is not returned from Cognito, so it may not always
be available. Worst case the user will need to re-configure SIWA in a new environment for amplify
init.

Co-authored-by: David Lopez <[email protected]>

* chore(release): Publish [ci skip]

 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - @aws-amplify/[email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]

* fix(auth): standardize CloudFormation trigger templates, prevent errors at runtime (#7219)

* fix: add-to-group PostConfirmation Lambda should not throw

Co-authored-by: Colin Ihrig <[email protected]>

* fix(amplify-cli): remove redundant prompt #6535 (#7098)

* fix: remove redundant prompt #6535

* fix(amplify-category-notifications): trim whitespace from fcm keys (#7456)

this commit prevents a copy/paste issue where an extra newline character comes along with an fcm
key.

fix #7440

* fix(amplify-provider-awscloudformation): rebase code and fixed yaml template load (#7518)

rebase code from latest updates and fixed yaml template load

* fix: check for undefined permissions when removing dependent permissions (#7594)

* fix: check for undefined permissions when removing dependent permissions

* fix(amplify-appsync-simulator): string functions not called on items … (#7636)

* fix(amplify-appsync-simulator): string functions not called on items of JavaArray<string> in the resolvers

* feat(amplify-appsync-simulator): added toJavaString that accepts a string and returns a JavaString

* feat(amplify-appsync-simulator): map.keySet returns an a JavaArray with elements of type JavaString

* feat(amplify-appsync-simulator): using this.mapper in map.keySet

* docs(cli): add 'future' to post-'amplify pull' success message for clarity (#7647)

change `Run 'amplify pull' to sync upstream changes.` -> `Run 'amplify pull' to sync future upstream
changes.` as desired in #5202

re #5202

Co-authored-by: Stuti Prasad <[email protected]>

* Create: BatchSize and MaximumBatchingWindow parameters, V2 streaming lambda (#7651)

* fix: Move credential validation to the top function call

getProfileCredentials isn't always pulling from a file with an access key/secret key, so validation can error out in the case of source profiles. Moving this to the top function getProfiledAwsConfig and performing the validation on the AWS config instead means we can accommodate source profiles.

* Change: Make batch size parameterized on streaming

* Change: batch size and batching window duration are parameters

* Change: Decrease searchable streaming MaximumBatchingWindow to 1 second

Co-authored-by: Vandenberg <[email protected]>

* fix: show friendly error message when pull fails with EPERM (#7653)

* fix: show friendly error message when pull fails with EPERM
fix #7448

Co-authored-by: Colin Ihrig <[email protected]>

* fix(amplify-category-auth): \n made OS specific (#7663)

* style:removed extra whitespaces and standardized tabs in auth-templates

* fix(amplify-category-auth): fixed newline escape sequence to be os specific

fix #7662

* fix: add/update function when some LL are not yet migrated (#7674)

* fix: add/update function when some LL are not yet migrated

* ci: add support for automatic tagged release (#7691)

Do an automatic tagged NPM release when a branch name is prefixed with tagged-release/

* fix: #7441 - init from git prompts for credentials twice (#7682)

* chore: update yarn.lock file (#7644)

Co-authored-by: Colin Ihrig <[email protected]>

* test(amplify-console-integration-tests): update the add environment fn ref pr#7098 (#7719)

* fix: checkout into existing env with new LL (#7687)

* fix: checkout into existing env with new LL

* test: update lambda function for auth schema tests, add optional types to LayerOptions, fix typos (#7728)

* fix(amplify-category-auth): added passrole policy to MFALambaRole (#7729)

Added policy with action iam:PassRole for MFALambdaRole

* chore(release): Publish [ci skip]

 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - @aws-amplify/[email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]

* Fix typos in Cognito triggers (#7745)

* test(cli): add test for resource-status extensions (#7744)

* feat(cli): amplify folder deletes regardless of presence in the cloud (#7740)

`amplify delete` now deletes the local `amplify` folder even if the project has been deleted in the
cloud.

close #7631

* bug(amplify-cli):resource-test file location issue resolved (#7712)

* bug(amplify-cli):resource-test file location issue resolved

* Changed  to '' for standard practice

* style(amplify-cli): Moved path import to top of the file

* fix: upgrade node default runtime to 14 (#7700)

* fix: upgrade node runtime to 14

As we approach the EOL for node 12 security updates new
lambdas should be ideally be on node 14

* test: set nodejs14 as the detault

* Category graphql/searchable enum filter (#7683)

* feat(cli): searchable enum generates string filterinput

* feat(cli): searchable enum generates string filterinput

* remove unwanted imports

* remove unwanted imports

* set improvePluralization default value to true

* chore: upgrade yarn packages recommended by dependabot (#7670)

* ci: add support for e2e token rotation (#7665)

* ci: add support for e2e token rotation

Currently we use long-lived, manually generated access tokens to set up AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables allowing our tests to run. This is a bad practice - authorization tokens should be automatically rotated to minimize risk of the tokens landing in the wrong hands.

This PR sets up the Amplify CLI codebase to use temporary credentials during CI. Temporary STS credentials use an additional parameter, AWS_SESSION_TOKEN, to authorize the requests.

This has been tested in CI on my fork and all tests pass:

https://app.circleci.com/pipelines/github/johnpc/amplify-cli/144/workflows/fb12f075-d881-4c92-8cf7-f8647afb909e

The token rotator itself is a lambda that runs every hour:

https://github.com/johnpc/amplify-e2e-token-rotation-lambda

* chore: use ini lib instead of manually updating file

* chore: update injectSessionToken calls

* Feature/rds utils (#7650)

* fix(amplify-appsync-simulator): string functions not called on items of JavaArray<string> in the resolvers

* feat(amplify-appsync-simulator): add support for rdsUtils.toJsonString

* feat(amplify-appsync-simulator): added toJavaString that accepts a string and returns a JavaString

* feat(amplify-appsync-simulator): map.keySet returns an a JavaArray with elements of type JavaString

* feat(amplify-appsync-simulator): map.keySet returns an a JavaArray with elements of type JavaString

* feat(amplify-appsync-simulator): using this.mapper in map.keySet

* feat(amplify-appsync-simulator): cleanup

* Revert "chore: upgrade yarn packages recommended by dependabot (#7670)" (#7758)

This reverts commit 6d16146.

* feat: add @aws_lambda to GQL transformer pass through directive list (#7757)

Updated GraphQL transformer to pass through @aws_lambda directive to output schema

* fix: disable layer version removal if fn depends on pinned version (#7627)

* fix: disable layer version removal when lambda fn depends on pinned version

* test(amplify-category-function): update remove walkthrough unit tests

* test(amplify-category-function): update amplify-meta mock value

* fix: display all dependent lambda fn in message

* test: add e2e test to verify dependency check

* fix(cli): use more explicit amplify pragma in .gitignore (#7568)

* fix(cli): use more explicit amplify pragma in .gitignore

Previously, we used the #amplify pragma to show which block of .gitignore was managed by amplify.
This causes confusion for customers who think it is safe to add or remove lines this section of
their gitignore. The cli will blitz any changes to this section on amplify init or amplify pull. By
using a more explicit pragma, customers will realize they should not touch this section of the
gitignore.

fix #7250

* test(cli): add coverage of legacy case

* chore: address nits

* chore: s/removeAmplifyIgnore/rebuildAmplifyIgnore

* fix(graphql-searchable-transformer): fix for awstimestamp issues with elastic search (#7534)

* feat(graphql-searchable-transformer): fix _lastChangedAt type for version control

* feat(graphql-searchable-transformer): more generic fix for all epoch fields

* fix(graphql-searchable-transformer): prevent int cast from truncating decimals if they exist

* feat(graphql-searchable-transformer): changed fix to use is_integer()

* Revert "ci: add support for e2e token rotation (#7665)" (#7759)

This reverts commit 57c0a03.

Co-authored-by: Ammar <[email protected]>

* Revert "fix: upgrade node default runtime to 14 (#7700)" (#7763)

This reverts commit 47968cc.

* Revert "Revert "ci: add support for e2e token rotation (#7665)" (#7759)" (#7762)

This reverts commit aadc915.

* test(amplify-console-integration-tests): handle no session token

* feat(amplify-category-function): skip unnecessary prompt for 'amplify update function'

* feat(amplify-category-function): skip unnecessary prompt for 'amplify update function'

* test: remove additional prompt from e2e

* feat(amplify-category-auth): enable alternative signup/signin options (#7461)

* feat(amplify-category-auth): enable alternative signup/signin options

this commit mirrors the options presented to users when creating a cognito user pool in the aws
console. alternative sign in options allow developers to create a coginito user that can sign in
using their preferred username, phone number, or email address.

re #1546

* feat(amplify-category-auth): add autoVerifiedAttributes for aliasAttributes

* chore(amplify-headless-interface): update schema

* chore(amplify-category-auth): get aliasAttributes _instead_ of signInOptions

* chore: use constants instead of magic strings

* fix(cli): prevent re-prompt of info on `amplify pull` (#7730)

* fix(cli): prevent re-prompt of info on `amplify pull`

 When the developer runs `amplify pull` and chooses "no" when prompted: "Do you plan on modifying this backend?", the cli should not prompt for all the project configuration settings when `amplify pull` is called again to receive updates. Since the entire `amplify/` dir is removed when this option is selected, we lose project configuration context.
This change keeps the `amplify/` dir around, only deleting the backend directories, and maintains the state of the project configuration.

* chore: use more explicit names

* test: add integ test

* test: remove extra push

* fix(cli): make delete clean local project if already deleted in cloud (#7551)

this commit adds NotFoundException handling to the `amplify delete` operation. If cloud resources
are not found, then that part of the delete must already be done, so we should move on and continue
deletion.

fix #7515

* test(amplify-e2e-tests): remove unneeded deleteProject call (#7769)

* chore(amplify-category-auth): use constants instead of magic strings (#7770)

* chore: remove stalebot config (#7768)

* test(amplify-category-auth): use AttributeType enum in test (#7773)

* bug(amplify-cli):Solved Windows compatibility issue, made location pa… (#7710)

* bug(amplify-cli):Solved Windows compatibility issue, made location paths os-specific

* Removed resource-test updation

* bug(amplify-cli):added addSnapshotSerializer functionality

* Updating "" to '' for standardization

Co-authored-by: Colin Ihrig <[email protected]>

* Fixed indentation

* fix(amplify-cli):Moved function to seperate file

* bug(amplify-cli):Created an object for addSnapshotSerializer()

* Fixed spaces in path.join()

* bug(amplify-cli):test function added to snapshot-serializer

* Removed extra space in .json file

Co-authored-by: Colin Ihrig <[email protected]>

* fix(amplify-category-auth): add handling for undefined autoVerifiedAttributes (#7780)

* test(amplify-e2e-tests): assume function and layer lambdas are not being tested simultaneously (#7782)

* test(amplify-e2e-tests): add layerAndFunctionExist param to trigger capability selection (#7784)

* feat(amplify-category-auth): use EnabledMFAs to only configure TOTP (#7779)

* feat(amplify-category-auth): use EnabledMFAs to only configure TOTP

* fix(amplify-category-auth): creation of SNS role only when phone no is configured

* refactor(amplify-e2e-tests): address PR comments

* Revert "feat(amplify-category-auth): use EnabledMFAs to only configure TOTP (#7779)" (#7790)

This reverts commit c2102c5.

* build: fix typo in publish script (#7788)

* test: turn off e2e test coverage, enable and fix import test (#7776)

* chore(release): Publish [ci skip]

 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - @aws-amplify/[email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]

* feat: add @PrimaryKey directive to Transformer v2 (#7797)

* fix: lambda timeout should be an integer type (#7699)

* fix: #7696 - support production package install for function category (#7812)

* fix: move storage check in @predictions v2 (#7816)

@predictions requires that storage is configured. This commit
moves the check out of the before() phase, as that is invoked
even if @predictions is not used in the schema, leading to
unnecessary errors.

Co-authored-by: Colin Ihrig <[email protected]>

* fix(amplify-cli-core): new-line escape sequence made os-specific (#7814)

* fix(amplify-graphql-types-generator): path-format to match snapshot (#7800)

* chore: fixed typo (#7786)

* feat: capability injection for the vNext GraphQL Transformer (#7735)

* fix: correct behavior of --yes on push when missing env var (#7826)

* chore(release): Publish [ci skip]

 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - @aws-amplify/[email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]

* test: improve schema validation in tests (#7845)

This commit exposes the validateModelSchema() function from
the GraphQL Transformer core. This function is helpful
for validating the Transformer output schema's correctness.
This commit also applies the validation to @predictions v2
test suite.

Co-authored-by: Colin Ihrig <[email protected]>

* fix: add DDB params to model v2 (#7827)

This commit updates @model in GraphQL Transformer v2 to create
the DynamoDB related CloudFormation parameters and conditions.

Co-authored-by: Colin Ihrig <[email protected]>

* feat: make cognito userpool id optional for headless mode (#7820)

* chore: update lerna and chalk dependencies, remove unused chalk-pipe (#7823)

* feat(amplify-util-mock): support pseudo parameters in environment variables when running `amplify mock function` (#7804)

* fix(amplify-category-auth): add auth user selections to aws-exports/amplifyconfiguration files (#7807)

* fix(graphql-auth-transformer): extend isOptional subscription owner check (#7765)

* fix: misc @model v2 VTL cleanup (#7856)

@model v2 was generating incorrect VTL in a large number of cases.
This commit fixes many of the cases found while working on the
@Index directive. It also moves some repeated code blocks into
functions.

Co-authored-by: Colin Ihrig <[email protected]>

* fix: use improved pluralization in graphql transformer v2 (#7817)

This commit updates GraphQL Transformer v2 to use the newly
improved pluralization rules by default.

Co-authored-by: Colin Ihrig <[email protected]>

* fix: multi-env container hosting (#7009) (#7346)

* fix: #7009 - Bug Fix for Multi-Env Container Hosting

* Update packages/amplify-cli/src/initialize-env.ts

Co-authored-by: John Hockett <[email protected]>

* fix: multi-Env container hosting - format fixed

* Update to use hosting key from TPI

* add domain and restrictAccess to the template

* fix lint errors

* fix lint errors

* add allowed values for restrictAccess

* added tests for container based testing

* update tests

Co-authored-by: John Hockett <[email protected]>

* Category graphql/searchable aggregate functions (#7764)

* feat(graphql-searchable): Aggregate support

* added enum type for aggregate type

* updated aggregate types to lowercase

* correct lint fix

* remove unused comments

* remove unwanted comments

* updated test snapshots

* update tests to include aggregate

* created new function for v2 searchTemplate

* organize imports

* Update packages/amplify-graphql-searchable-transformer/src/definitions.ts

Co-authored-by: Colin Ihrig <[email protected]>

* added e2e tests for aggregates

* remove unused imports

* update error handling

Co-authored-by: Colin Ihrig <[email protected]>

* test(graphql-model-transformer): graphql model transformer tests (#7836)

* Add .circleci/config.yml

* test: ported @model v1 test suite to v2

* chore(graphql-model-transformer): removed improvePluralization check, V2 uses improvePluralization

* chore(graphql-model-transformer): added parse() to tests that generate a valid schema

* test(graphql-model-transformer): added validateModelSchema check to existing model v2 tests

* feat: create new amplify-prompts package to handle all terminal interactions (#7774)

* feat: working on prompts package

* feat: add list picker methods

* feat: autocomplete for all pick types

* feat: fancy types

* test: restructure interface a bit and scaffold unit tests

* test: adding a bunch of tests

* chore: mark deprecated methods / functions

* chore: adding some comments

* Update packages/amplify-prompts/src/__tests__/prompter.test.ts

Co-authored-by: John Hockett <[email protected]>

* chore: rename multiselect => multiSelect

* feat: better support for --yes and support input list

* fix: use EOL as line ending

Co-authored-by: John Hockett <[email protected]>

* test(amplify-e2e-tests): add force push e2e with no change to functions and api (#7847)

* fix(graphql-model-transformer): model input fields transform (#7857)

* Add .circleci/config.yml

* test: ported @model v1 test suite to v2

* chore(graphql-model-transformer): removed improvePluralization check, V2 uses improvePluralization

* chore(graphql-model-transformer): added parse() to tests that generate a valid schema

* test(graphql-model-transformer): added validateModelSchema check to existing model v2 tests

* fix(graphql-model-transformer): fixed @model transform input object fields type

Converted fields of input type objects to also be of input type. Small typo fixes.

* Add .circleci/config.yml

* Add .circleci/config.yml

* chore(graphql-model-transformer): removed test for deprecated @model feature flag

* chore(amplify-provider-awscloudformation): reduce log level (#7864)

since cfn-lint is deprecated, it does not always proper validate cloudformation. we've made validation errors non-blocking already in [#7132](#7132). This commit also addresses the log level so as not to confuse customers with a red error message.

#7831

* fix(amplify-category-function): Storage env vars not added to lambda function (#7785)

* fix(7718) Storage env vars not added to lambda function

* unit-tests

Co-authored-by: Sachin Panemangalore <[email protected]>

* chore: rename master -> main branch (#7811)

* fix(amplify-frontend-ios): amplify-xcode, add files to primary target (#7738)

* fix: improve size checks before packaging Lambda resources (#7756)

* fix: improve size checks before packaging Lambda resources

* refactor: move folderSize to utils function, add limit const

* refactor: call getFolderSize with array of paths

* refactor: remove unused path import

* fix: lint ignore (#7871)

* test: fix test line trim (#7872)

* test: force chalk colors in test in CCI (#7875)

* Revert "chore: rename master -> main branch (#7811)" (#7868)

This reverts commit 9c4cd82.

* test(amplify-e2e-tests): fix casing for api name (#7885)

* fix: fiux e2e tests by passing categoryName for the resource (#7886)

* fix(container-hosting): e2e test fix (#7889)

* Revert "fix(container-hosting): e2e test fix (#7889)" (#7894)

This reverts commit f9d7983.

* fix(container-hosting): ignore test cases (#7895)

* fix(container-hosting): ignore test cases

* used it.skip instead of comments

* used it.skip instead of comments

* chore(release): Publish [ci skip]

 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - @aws-amplify/[email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - @aws-amplify/[email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]

* feat: add @Index directive (#7887)

* feat: add @Index directive

* fix(graphql-model-transformer): fixed input type field generation for enum types

* fix: update @searchable v2 snapshot

* fix: address lgtm bot messages

* fix: update deps after latest release

Co-authored-by: Colin Ihrig <[email protected]>
Co-authored-by: lazpavel <[email protected]>

* Feature/amplify enhanced status (#7698)

* enhanced amplify status

* help and test

* show summary view on amplify push

* Fixed s3

* unit test for showStatusTable

* fixed ViewResourceTableParams

* Converted cloudformation file-path to use Glob

* cleanup and headers

* 1. removed custom yaml handling and used library code.
2. Used readCFNTemplate to load templates.
3. Cleaned up unused code

* addressed PR comments

* Added types to template, diff

* addressed more PR comments

* updated unit test coverage and fixed test errors

* fix multi-env diffs for new resources

* 1. category filters for summary.
2. removed spacing between categories in detail-view.
3. updated help for summary.
4. added case normalization for options

* updated help to indicate summary filters

* Update Readme.md

Added category filters for summary table

* fixed unit tests and merge errors

* Update Readme.md

fixed case

* Update packages/amplify-cli-core/src/cliViewAPI.ts

Co-authored-by: akshbhu <[email protected]>

* Update packages/amplify-cli/src/extensions/amplify-helpers/resource-status-view.ts

Co-authored-by: akshbhu <[email protected]>

* addressed CR comments

* lgtm:fix:removed unused variable

* unit-tests for cliViewAPI

* removed styling from help test

* unit-test for detailed cloudformation-diff for one resource

Co-authored-by: Sachin Panemangalore <[email protected]>
Co-authored-by: akshbhu <[email protected]>

* chore(amplify-category-auth): updated login mechanisms label (#7878)

* fix(graphql-model-transformer): fixed input type field generation for enum types (#7879)

* fix(graphql-model-transformer): added @model name reserved words validation (#7877)

* fix(graphql-model-transformer): added @model name reserved words validation

* fix(graphql-model-transformer): added @model name reserved words validation

* Update packages/amplify-graphql-model-transformer/src/__tests__/model-transformer.test.ts

Co-authored-by: Colin Ihrig <[email protected]>

Co-authored-by: Colin Ihrig <[email protected]>

* Rename elasticsearch to @searchable & opensearch in v2 transformer (#7775)

* refactor(graphql-searchable-transformer): change Elasticsearch refs to @searchable and OpenSearch

* refactor(graphql-transformer-core): change Elasticsearch refs to @searchable and OpenSearch

* refactor(graphql-transformer-interfaces): change Elasticsearch refs to @searchable and OpenSearch

* refactor(graphql-model-transformer): change Elasticsearch refs to @searchable and OpenSearch

* refactor(graphql-mapping-template): add OpenSearch template that extends from Elasticsearch

* refactor(graphql-mapping-template): create Searchable template and extend for Elasticsearch template

* refactor(graphql-searchable-transformer): use Searchable mapping template

* refactor(graphql-searchable-transformer): update additional refs to Elasticsearch in python script

* refactor(graphql-transformer-common): add OpenSearch to resource constants file

* refactor(graphql-searchable-transformer): swap out Elasticsearch constants with OpenSearch

* refactor(graphql-transformer-core): fix typo

* refactor(graphql-transformer-core): change AMAZON_OPENSEARCH back to AMAZON_ELASTICSEARCH

* refactor(graphql-searchable-transformer): change AMAZON_OPENSEARCH back to AMAZON_ELASTICSEARCH

* refactor(graphql-transformer-interfaces): change AMAZON_OPENSEARCH back to AMAZON_ELASTICSEARCH

* Update packages/amplify-graphql-searchable-transformer/streaming-lambda/python_streaming_function.py

Co-authored-by: Colin Ihrig <[email protected]>

* refactor(graphql-transformer-core): fix rebase

* refactor(graphql-searchable-transformer): change ES_ env vars to OPENSEARCH_

* refactor(graphql-transformer-core): rename elastic search to searchble in code comments

Co-authored-by: Colin Ihrig <[email protected]>

* build(deps): bump tar from 4.4.13 to 4.4.15 (#7867)

Bumps [tar](https://github.com/npm/node-tar) from 4.4.13 to 4.4.15.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](isaacs/node-tar@v4.4.13...v4.4.15)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: add deprecated tag to context.print (#7911)

* chore: mark context print deprecated

* chore: remove test prompts from demo

* feat(amplify-go-function-runtime-provider): add support for go1.16, install deps before build (#7617)

* fix(amplify-category-function): fixed issue for removing function env variable (#7917)

cloudformation-template.json file has the env variable in camel case format, so env variable
deletion should look for camel case version of the variable name

fix #7777

* fix: added await to init invocation (#7919)

* test: fix e2e and unit test failures related to status changes (#7936)

* test: fix auth e2e expect text (#7944)

* chore: add aws-cdk dep in amplify-cli (#7951)

* chore: add uuid in amplify-cli deps (#7955)

* fix: specify default auth role name on import auth (#7921)

* feat: model transformer advanced subscriptions (#7927)

* test: fix flaky add auth test (#7969)

* fix(amplify-category-auth): fixed no parameter when hostedui is not present (#7914)

* chore: add missing dependency, fix cdk version (#7980)

* chore: revert awscdk to 1.118.0, upgrade pkg to latest (#7983)

* feat: amplify add override root command and skeleton generation (#7684)

* feat: amplify add override root command and skeleton generation

* feat: build and package overrides directory

* test: add unit tests

* fix: updates with PR comments

* test: fix unit tests

Co-authored-by: Ghosh <[email protected]>

* chore: publish ext branch as a tag (#7689)



Co-authored-by: Ghosh <[email protected]>

* test: cci publish for ext branch

* test: pubish ext branch to npm

* feat: add helper util package for overrides (#7726)

* feat: add helper util package for overrides

* fix: remove lib files

* fix: add overrides helper lib to gitignore

* fix: namespace overrides package

* fix: fix eslint errors in lib/ files

Co-authored-by: Ghosh <[email protected]>

* chore(release): Publish [ci skip]

 - @aws-amplify/[email protected]

* feat: Override functionality enabled for Root stack (#7702)

* feat: initial commit

* feat: root stack creation on init with cdk

* feat: enable for push

* feat: added build command for root stack override

* fix: authrole and Unauthrole Names

* feat: added synthesizer and address comments

* feat: added hash for root stack

* feat: deploy root stack to disk

* feat: updated amplifyMeta after root override

* feat: update curren-cloud-backend

* feat: refractor Root transform and added unit tests

* fix: removes Template from Cloudform

* feat: added build step in overrides

* fix: unit tests

Co-authored-by: David Lopez <[email protected]>
Co-authored-by: David Lopez <[email protected]>
Co-authored-by: aws-amplify-bot <[email protected]>
Co-authored-by: C. Lewis <[email protected]>
Co-authored-by: Colin Ihrig <[email protected]>
Co-authored-by: Gita Alekhya Paul <[email protected]>
Co-authored-by: John Corser <[email protected]>
Co-authored-by: Rafael M. Koike <[email protected]>
Co-authored-by: Mohammed Ali Chherawalla <[email protected]>
Co-authored-by: Bentheburrito <[email protected]>
Co-authored-by: Stuti Prasad <[email protected]>
Co-authored-by: Marc VandenBerg <[email protected]>
Co-authored-by: Vandenberg <[email protected]>
Co-authored-by: Yathi <[email protected]>
Co-authored-by: Colin Ihrig <[email protected]>
Co-authored-by: John Hockett <[email protected]>
Co-authored-by: Attila Hajdrik <[email protected]>
Co-authored-by: Josue Ruiz <[email protected]>
Co-authored-by: Ammar <[email protected]>
Co-authored-by: Luke Seemann <[email protected]>
Co-authored-by: MURAKAMI Masahiko <[email protected]>
Co-authored-by: Michael Brewer <[email protected]>
Co-authored-by: Christopher Sundersingh <[email protected]>
Co-authored-by: John Corser <[email protected]>
Co-authored-by: jcbdev <[email protected]>
Co-authored-by: josef <[email protected]>
Co-authored-by: Yoshiaki Togami <[email protected]>
Co-authored-by: Edward Foyle <[email protected]>
Co-authored-by: Sam Patzer <[email protected]>
Co-authored-by: lazpavel <[email protected]>
Co-authored-by: Josue Ruiz <[email protected]>
Co-authored-by: Sachin Panemangalore <[email protected]>
Co-authored-by: Sachin Panemangalore <[email protected]>
Co-authored-by: Diego Costantino <[email protected]>
Co-authored-by: Danielle Adams <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jainam Shah <[email protected]>
Co-authored-by: Kaustav Ghosh <[email protected]>
Co-authored-by: Ghosh <[email protected]>
@github-actions github-actions bot added the referenced-in-release Issues referenced in a published release changelog label Aug 24, 2021
@github-actions
Copy link

👋 Hi, this issue was referenced in the v5.3.1 release!

Check out the release notes here https://github.com/aws-amplify/amplify-cli/releases/tag/v5.3.1.

@conorw
Copy link

conorw commented Sep 16, 2021

I can confirm this issue still exists in v5.6.0

@conorw
Copy link

conorw commented Sep 16, 2021

Correction. This may have been something weird in my project.
I was able to resolve by editing the nested-cloudformation-stack.yml file in the backend/awscloudformation/build folder

marcvberg pushed a commit to marcvberg/amplify-cli that referenced this issue Oct 13, 2021
… variable (aws-amplify#7917)

cloudformation-template.json file has the env variable in camel case format, so env variable
deletion should look for camel case version of the variable name

fix aws-amplify#7777
@github-actions
Copy link

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working functions Issues tied to the functions category referenced-in-release Issues referenced in a published release changelog
Projects
None yet
Development

No branches or pull requests

6 participants