eggwhat / aws-catalogify

https://d3tqv0ydvy0r05.cloudfront.net/
3 stars 0 forks source link

Some attentions to deployment the web assembly application with CloudFront service currently configured. #4

Closed SaintAngeLs closed 5 months ago

SaintAngeLs commented 5 months ago

Theoretically the deployment should happen directly with the 'aws' CLI. Unfortunately, we do not have this option enabled, as for this purpose we would need the a aws user and group policy permissions defined. With a lack of success, I've also tried npm global package amplify for which I would also need to use the real AWS account. The solution I would like to use is to publish the application with the Release configuration with the help of:

dotnet publish -c Release

, and it will be possilble to find the compiled and mistificated files of the published web assembly application in

/... path from  the home .../ ... /Cataloguify/Cataloguify.Client/bin/Release/net8.0/publish/wwwroot

After each modification related to the production, it is important to publish the application, take the files from the bin release files (the whole wwwroot directory) and put it to the configured backed for the CloudFront Service environment backet catalogify-blazor-web-assembly 'catalogify-blazor-web-assembly' . The CloudFront is configured to take the index.html from the /wwwroot origin directly, so there is no need to add eack of the compiled files to the backet.

eggwhat commented 5 months ago

It doesn't even work with LabRole ?

SaintAngeLs commented 5 months ago

To configure the aws for deployment we need the keys required from cli:

aws configure

\AWS Access Key ID [None]: 
AWS Secret Access Key [None]: 
Default region name [None]: 
Default output format [None]: 

if there is a way to get this data from LabRole, it may be the way.

The solution we currently have is to update the backet, cloudfront has access to with the new version manually.

eggwhat commented 5 months ago

When you start lab environment you get access to these keys. You have to click AWS Details and then AWS CLI.