For anyone deploying to AWS Amplify that is running into the 403 Forbidden issue, we managed to get the package installs working nicely by adding the following to our amplify.yml file.
Note that we tried the yarn equivalents initially, however only had luck using npm.
version: 1
frontend:
phases:
preBuild:
commands:
- npm config set //npm.greensock.com/:_authToken your-secret-token-goes-here
- npm config set @gsap:registry https://npm.greensock.com
- npm install gsap@npm:@gsap/shockingly
- npm config delete //npm.greensock.com/:_authToken
- npm config delete @gsap:registry
- yarn install
build:
# the rest of your amplify build stuff under here...
Hope this can help someone running into the same issue!
Also, we would be keen to hear of any other solutions people have come across.