aws-amplify / aws-amplify/amplify-hosting

Specify Live Package Updates in amplify.yml file

Open
#2,464 2 comments 0 reactions 0 assignees View on GitHub
bug question
Dominant language
Dockerfile
Stars
481
Forks
123
PR merge metrics
No merged PRs in 30d

Description

**Please describe which feature you have a question about?**
Recently I had problems with Cypress because of Amplify's Node version (https://github.com/aws-amplify/amplify-console/issues/2462). I used Live Package Updates feature under Build Settings in console to set Node version to 16.13.1 and everything worked fine.

Now, in the spirit of having a single source of truth and keeping everything inside our repository, is there a way to set this through `amplify.yml` file?

**Provide additional details**
I saw that after setting the Live Package Update for Node, an environment variable `_LIVE_UPDATES` was created in the console (visible at "Environment Variables"). So I added the following to my `amplify.yml` file:

```yml
env:
variables:
_LIVE_UPDATES: [{"pkg":"@aws-amplify/cli","type":"npm","version":"latest"},{"pkg":"node","type":"nvm","version":"16.13.1"}]
```

But it does not seem to work. I expected this setting to be detected when connecting the branch and Live Package Updates fields to be populated accordingly. Maybe giving priority to `amplify.yml` configurations, as it is now for other features.

**What AWS Services are you utilizing?**

- AWS Amplify

**Provide additional details e.g. code snippets**

N/A

Contributor guide

Open the contributing guide

Research direction

Start with the amplify.yml example and the _LIVE_UPDATES environment variable described in the issue, then trace how Live Package Updates are represented in Amplify Hosting Build Settings. Done means a repository configuration can set the Node version and other live package updates, and those values are detected when a branch is connected.

Written by the indexing model from the issue text.

Assessment

Tech stack
yaml
Domain
ci-cd, cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.