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

[BUG] Backend environment cache not used #3901

Closed
3 tasks done
tripproberts opened this issue Jan 19, 2024 · 4 comments
Closed
3 tasks done

[BUG] Backend environment cache not used #3901

tripproberts opened this issue Jan 19, 2024 · 4 comments
Labels
archived This issue has been locked. feature-request New feature or request

Comments

@tripproberts
Copy link

Before opening, please confirm:

Amplify Hosting feature

Backend builds

Is your feature request related to a problem? Please describe:

I have an Amplify app connected to a Github repo which consists of only backend components (Lambdas, APIs, and Auth).

On every deploy, all of my backend resources are initialized and deployed from scratch.

The below backend build logs appear in every deployment despite the env existing and many previous deployments occurring.

# Starting phase: build
# Executing command: amplifyPush -s
2024-01-19T03:45:21.489Z [INFO]: # Getting Amplify CLI Cloud-Formation stack info from environment cache
2024-01-19T03:45:21.498Z [INFO]: # Start initializing Amplify environment: tripp
# Initializing new Amplify environment: tripp (amplify init)

According to the end of the backend build step, a complete stackinfo appears to be stored in the env cache

2024-01-04T16:15:10.502Z [INFO]: # Done initializing Amplify environment: tripp
2024-01-04T16:15:10.502Z [INFO]: # Store Amplify CLI Cloud-Formation stack info in environment cache
2024-01-04T16:15:11.902Z [INFO]: STACKINFO={
                                 "awscloudformation": {
                                 "AuthRoleName": "amplify-...."
                                 .....
}

The deployment succeeds, but I'm not sure why following deployments cannot fetch stackinfo from the env cache.

My amplify.yml is pretty basic

version: 1
backend:
  phases:
    build:
      commands:
        - amplifyPush -s
frontend:
  phases:
    preBuild:
      commands:
        - npm ci
    build:
      commands: []
  artifacts:
    baseDirectory: docs
    files:
      - '**/*'

Describe how you'd like this feature to work

I'm expecting stackinfo to be available in the env cache for each backend deployment, and my environment updated instead of initialized each time.

@tripproberts tripproberts added the feature-request New feature or request label Jan 19, 2024
Copy link

This has been identified as a feature request. If this feature is important to you, we strongly encourage you to give a 👍 reaction on the request. This helps us prioritize new features most important to you. Thank you!

@tripproberts
Copy link
Author

Seems to be a duplicate of #2096

I solved my issue by using a custom amplifyPush.sh script

Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Copy link

This issue has been automatically locked.

@github-actions github-actions bot added the archived This issue has been locked. label Jan 19, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jan 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived This issue has been locked. feature-request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant