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

Amplify Directory Structure #13592

Closed
spesnova opened this issue Feb 15, 2024 · 3 comments
Closed

Amplify Directory Structure #13592

spesnova opened this issue Feb 15, 2024 · 3 comments
Labels
functions Issues tied to the functions category pending-response Issue is pending response from the issue author pending-triage Issue is pending triage question General question

Comments

@spesnova
Copy link

spesnova commented Feb 15, 2024

Amplify CLI Version

12.10.1

Question

If there're files like below:

amplify/backend/function/<FUNCTION_NAME>/<FUNCTION_NAME>-cloudformation-template.json
amplify/backend/awscloudformation/build/function/<FUNCTION_NAME>/<FUNCTION_NAME>-cloudformation-template.json

Can I consider they're duplicated ? And should I delete either file?

This question is basically about directory structure. What's the difference between amplify/backend/function/ and amplify/backend/awscloudformation/build/function/? I have tried to find the answer in official docs and this repo but can't find it.

There's a page about Files and Folders in official doc. It says you can edit files under amplify/backend. I'd like to know more details under amplify/backend folder.

If possible, I also want to know not only about under amplify/backend folder but also whole amplify project's directory structure details. This could save both maintainers' and users' time.

@spesnova spesnova added pending-triage Issue is pending triage question General question labels Feb 15, 2024
@ykethan
Copy link
Member

ykethan commented Feb 15, 2024

Hey @spesnova, thank you for reaching out. Amplify manages resources under amplify/backend/<resource-name>/ directory structure. Where for example: amplify/backend/function/<FUNCTION_NAME>/ contains your function code and CloudFormation templates that are generated and deployed by Amplify, which is your current working directory.
The amplify/backend/awscloudformation/build/function/ is a local build of the function CloudFormation template on a push/build ensures there aren't any inconsistencies that may cause deployment failures.
I would not recommend deleting them manually to prevent any push failures. To note, while it's safe to edit the function's CloudFormation template to modify settings such as runtime version or timeout, subsequent executions of amplify update function may overwrite your changes.

@ykethan ykethan added functions Issues tied to the functions category pending-response Issue is pending response from the issue author labels Feb 15, 2024
@ykethan
Copy link
Member

ykethan commented May 3, 2024

Closing the issue due to inactivity. Do reach out to us if you require any assistance.

@ykethan ykethan closed this as not planned Won't fix, can't repro, duplicate, stale May 3, 2024
Copy link

github-actions bot commented May 3, 2024

This issue is now closed. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
functions Issues tied to the functions category pending-response Issue is pending response from the issue author pending-triage Issue is pending triage question General question
Projects
None yet
Development

No branches or pull requests

2 participants