Skip to content

Commit

Permalink
Auto-set the backend API based on the stack name in env BACKEND_STACK…
Browse files Browse the repository at this point in the history
…_NAME
  • Loading branch information
wtromano committed Aug 20, 2024
1 parent d7b321a commit 8a534fd
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions workshops/serverless-testing-workshop/demo-app/urs-ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,13 +218,6 @@ def update_unicorn_reserve_list():
key="api_endpoint_url",
on_change=update_api_endpoint
)
if st.button(f"Reset API Endpoint from Stack"):
cfn_client = boto3.client('cloudformation')
response = cfn_client.describe_stacks(StackName=os.environ.get('BACKEND_STACK_NAME','urs-backend'))
for output in response['Stacks'][0]['Outputs']:
if output['OutputKey'] == 'ApiEndpoint':
st.write(f"Resetting API Endpoint to: {output['OutputValue']}")


# File picker for uploading to the unicorn inventory
uploaded_file = st.file_uploader("Choose a CSV file for the Unicorn Inventory.", type=["csv"])
Expand Down

0 comments on commit 8a534fd

Please sign in to comment.