Open u93 opened 1 year ago
As a note, this issue it's stopping a production release from our application and somehow I'm still getting the AMPLIFY_parameter resources again after I stopped getting them
Category β Resource name β Operation β Provider plugin β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Parameters β AMPLIFY_function_AdminQueriesd8df3ab6_deploymentBucketName β Create β β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Parameters β AMPLIFY_function_AdminQueriesd8df3ab6_s3Key β Create β β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Parameters β AMPLIFY_function_S3Triggerc2f3c2fa_deploymentBucketName β Create β β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Parameters β AMPLIFY_function_S3Triggerc2f3c2fa_s3Key β Create β β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Parameters β AMPLIFY_function_api_aiCameraCoreTableBaseName β Create β β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Parameters β AMPLIFY_function_api_cognitoUserPoolClientId β Create β β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Parameters β AMPLIFY_function_api_cognitoUserPoolId β Create β β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Parameters β AMPLIFY_function_api_ddnsCameraTableBaseName β Create β β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Parameters β AMPLIFY_function_api_deploymentBucketName β Create β β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Parameters β AMPLIFY_function_api_env β Create β β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Parameters β AMPLIFY_function_api_eventsTableBaseName β Create β β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Parameters β AMPLIFY_function_api_notesTableBaseName β Create β β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Parameters β AMPLIFY_function_api_permissionsTableName β Create β β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Parameters β AMPLIFY_function_api_placeholder β Create β β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Parameters β AMPLIFY_function_api_region β Create β β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Parameters β AMPLIFY_function_api_s3Key β Create β β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Parameters β AMPLIFY_function_api_sessionsTableName β Create β β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Parameters β AMPLIFY_function_api_telemetryCamerasTableBaseName β Create β β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Parameters β AMPLIFY_function_api_telemetryCoreCurrentStateTableBaseName β Create β β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Parameters β AMPLIFY_function_api_telemetryCoreTableBaseName β Create β β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Parameters β AMPLIFY_function_api_transcodedCameraCoreTableBaseName β Create β β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Parameters β AMPLIFY_function_api_userAccessKey β Create β β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Parameters β AMPLIFY_function_api_userRegion β Create β β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Parameters β AMPLIFY_function_api_userSecretKey β Create β β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Parameters β AMPLIFY_function_api_videoCameraCoreTableBaseName β Create β β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Parameters β AMPLIFY_function_coreconsolecf3573d0PostAuthentication_deploymentBucketName β Create β β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Parameters β AMPLIFY_function_coreconsolecf3573d0PostAuthentication_s3Key β Create β β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Analytics β coreconsole β No Change β awscloudformation β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Api β AdminQueries β No Change β awscloudformation β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Api β supportui β No Change β awscloudformation β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Auth β coreconsolecf3573d0 β No Change β awscloudformation β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Auth β userPoolGroups β No Change β awscloudformation β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Function β AdminQueriesd8df3ab6 β No Change β awscloudformation β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Function β S3Triggerc2f3c2fa β No Change β awscloudformation β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Function β api β No Change β awscloudformation β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Function β coreconsolecf3573d0PostAuthentication β No Change β awscloudformation β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Hosting β S3AndCloudFront β No Change β awscloudformation β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Storage β fususcoreConsoleEvents β No Change β awscloudformation β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Storage β fususcoreConsoleSettings β No Change β awscloudformation β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββββββββ€
β Storage β supportUiContent β No Change β awscloudformation β
ββββββββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄ββββββββββββ΄ββββββββββββββββββββ
[β₯] Resource Stack: Parameters/AMPLIFY_function_AdminQueriesd8df3ab6_deploymentBucketName : Create
No changes
[β₯] Resource Stack: Parameters/AMPLIFY_function_AdminQueriesd8df3ab6_s3Key : Create
No changes
[β₯] Resource Stack: Parameters/AMPLIFY_function_S3Triggerc2f3c2fa_deploymentBucketName : Create
No changes
[β₯] Resource Stack: Parameters/AMPLIFY_function_S3Triggerc2f3c2fa_s3Key : Create
No changes
[β₯] Resource Stack: Parameters/AMPLIFY_function_api_aiCameraCoreTableBaseName : Create
No changes
[β₯] Resource Stack: Parameters/AMPLIFY_function_api_cognitoUserPoolClientId : Create
No changes
[β₯] Resource Stack: Parameters/AMPLIFY_function_api_cognitoUserPoolId : Create
No changes
[β₯] Resource Stack: Parameters/AMPLIFY_function_api_ddnsCameraTableBaseName : Create
No changes
[β₯] Resource Stack: Parameters/AMPLIFY_function_api_deploymentBucketName : Create
No changes
[β₯] Resource Stack: Parameters/AMPLIFY_function_api_env : Create
No changes
[β₯] Resource Stack: Parameters/AMPLIFY_function_api_eventsTableBaseName : Create
No changes
[β₯] Resource Stack: Parameters/AMPLIFY_function_api_notesTableBaseName : Create
No changes
[β₯] Resource Stack: Parameters/AMPLIFY_function_api_permissionsTableName : Create
No changes
[β₯] Resource Stack: Parameters/AMPLIFY_function_api_placeholder : Create
No changes
[β₯] Resource Stack: Parameters/AMPLIFY_function_api_region : Create
No changes
[β₯] Resource Stack: Parameters/AMPLIFY_function_api_s3Key : Create
No changes
[β₯] Resource Stack: Parameters/AMPLIFY_function_api_sessionsTableName : Create
No changes
[β₯] Resource Stack: Parameters/AMPLIFY_function_api_telemetryCamerasTableBaseName : Create
No changes
[β₯] Resource Stack: Parameters/AMPLIFY_function_api_telemetryCoreCurrentStateTableBaseName : Create
No changes
[β₯] Resource Stack: Parameters/AMPLIFY_function_api_telemetryCoreTableBaseName : Create
No changes
[β₯] Resource Stack: Parameters/AMPLIFY_function_api_transcodedCameraCoreTableBaseName : Create
No changes
[β₯] Resource Stack: Parameters/AMPLIFY_function_api_userAccessKey : Create
No changes
[β₯] Resource Stack: Parameters/AMPLIFY_function_api_userRegion : Create
No changes
[β₯] Resource Stack: Parameters/AMPLIFY_function_api_userSecretKey : Create
No changes
[β₯] Resource Stack: Parameters/AMPLIFY_function_api_videoCameraCoreTableBaseName : Create
No changes
[β₯] Resource Stack: Parameters/AMPLIFY_function_coreconsolecf3573d0PostAuthentication_deploymentBucketName : Create
No changes
[β₯] Resource Stack: Parameters/AMPLIFY_function_coreconsolecf3573d0PostAuthentication_s3Key : Create
No changes
And in the environment that is failing, those parameters do not show up, which I assume it's what is causing the issue... Can I manually delete them? Or is there a way to get those to stop showing?
Thanks!
If it helps, here is one of the session IDs that amplify CLI has shown for these errors:
518b483d-c3ba-4f07-9e1e-e1cdc544cbc3
Thanks!
Hey @u93 :wave: thanks for raising this! When changing Amplify environments are you also checking out a different git branch? Can you try running amplify env checkout release
twice before pushing?
The Parameters
you see were introduced in a later version of the CLI and will be removed from your status
print after you're able to successfully push with the CLI.
Is functionapi
the Lambda function you updated? Are the missing parameters related to the resource access permissions it has such as Table access?
Hi @josefaidt,
My process for pushing to different environments it's the same as the one described in the amplify docs... First will do my changes to my dev
env from my dev
branch, then push them. After will do a merge to the new branch, release
branch in this case, then a checkout of the release
branch and then for last amplify env checkout release
to then push...
The changes related are for environment variables configurations, there were removed from the dev
version function and that somehow are required in release
still. The parameters are also shown in team-provider-info.json
Doing amplify env checkout release
twice does not do anything...
Regards
Also, @josefaidt , in which files should those parameters be located... In backend-config.json
only or in none at all? The reason I ask, is that when I'm going to make a push to my dev
environment, which is an environment that is working right now, I get changes in my repo, in backend-config.json
adding the AMPLIFY_function_xxxx
parameters, then when I merge into my release
branch and try to push, I get the opposite, Amplify CLI tries to remove the AMPLIFY_function_xxxx
parameters
Hey @u93 environment-specific parameters are now stored in SSM Parameter Store and in the team-provider-info.json
file. These parameters (shown as "Parameter" resources) should be stored in amplify/backend/backend-config.json
. If they are also present in amplify-meta.json
it should be safe to remove them rather than waiting for the successful push, however their display in the status
page is a cosmetic bug and should not effect the success of amplify push
.
I will take a deeper look at these parameters across environments
Hi @josefaidt ,
Thanks for digging and the explanation. Do you need more from information from me? As I said before, this issue it's impairing our production deployment of the application and we do not know how to pass this as it's not an issue in our code and the CLI was used in a very standard way.
Is there any way to override those parameters so the cloudformation stack does not need them?
Regards,
Hey @u93 I was able to reproduce this by using the provided steps. Marking as a bug.
As a workaround, you can run manually remove the environment variables from the corresponding function block in your amplify/team-provider-info.json
file and remove the associated parameters from amplify/backend/backend-config.json
I am facing the same behavior as @u93, among some other problems at #12188. When I am merging my changes from dev environment to staging environment and trying to do amplify push, CLI for some reason removes the whole parameters
block from my backend-config.json
. Is it safe to complete the push, or is there something I can do to workaround this @josefaidt? I guess it is not okay that in staging Amplify removes this part as it remains there in dev.
I don't want to risk breaking the environment, so this is also blocking releases for us now.
E: As a sidenote, I have not experienced the visual bug where all parameters are shown on amplify status. E2: Apparently the parameters block being removed on push is by design. It is added back after completing the push.
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
14.21.3
Amplify CLI Version
10.7.3
What operating system are you using?
Mac
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No
Describe the bug
Updated function by removing environment variables and also pushed to my
dev
environment withamplify push
. After moving to a different environment by changing branches and runningamplify env checkout {ENV_NAME}
and doing,amplify push
again, the deployment failsThe error produced a session ID and also a report. Happy to share them just need to know how.
Expected behavior
After checkout of the env that I want to deploy, deployment should be successful as it has been always when doing something similar.
Reproduction steps
amplify function update
amplify push
amplify env checkout release
amplify push
Project Identifier
4d3029e4c61cca9982ff470ba7f8b44e
Log output
Additional information
No response
Before submitting, please confirm: