Dev WS 3.2 LazyStack for Visual Studio MacOS
Install Steps
Prerequisites: AWS Account, AWS CLI, AWS SAM CLI, .NET CLI, and LazyStack .NET CLI Tool.
- Install/Update Visual Studio 2022 for Mac
- Configure Visual Studio for Mac External Tools
- Open Visual Studio for Mac
- Add LazyStack -- Generate Projects tool
- Select Tools→Edit Custom Tools. The External Tools Panel appears.
- Click the Add button. "New Tool" is added to the tools list.
- Select "New Tool".
- Edit Title to read "LazyStack - Generate Projects"
- Edit Command to read "/Users/yourlogin/.dotnet/lazystack". Be sure to replace yourlogin with your mac user name.
- Edit Arguments to read "projects"
- Edit Working Directory to read "${SolutionDir}"".
- Make sure Use output Window is checked.
- Add SAM Publish AWS Stack tool
- Click the Add button. "New Tool" is added to the tools list.
- Select "New Tool".
- Edit Title to read "SAM Publish AWS Stack"
- Edit Command to read "sam".
- Generate a GUID to use in place of {guid} in the following command. You will also use this GUID in a later step, so make a note of it.
- Edit Arguments to read "deploy -t Stacks/Dev/serverless.template --stack-name ${SolutionName}Dev --s3-bucket samimages-{guid} --capabilities CAPABILITY_NAMED_IAM"
- Edit Working Directory to read "${SolutionDir}"".
- Make sure Use output Window is checked.
- Add LazyStack -- Generate Stacks\Dev\AwsSettings.json tool
- Click the Add button. "New Tool" is added to the tools list.
- Select "New Tool".
- Edit Title to read "LazyStack - Generate Stacks\Dev\AwsSettings.json"
- Edit Command to read "/Users/yourlogin/.dotnet/lazystack". Be sure to replace yourlogin with your mac user name.
- Edit Arguments to read "settings ${SolutionName}Dev Stacks/Dev/AwsSettings.json"
- Edit Working Directory to read "${SolutionDir}"".
- Make sure Use output Window is checked.
- Click the OK button. The External Tools Panel closes.
- Use AWS CLI to add a S3 samimages bucket
- Open a Terminal.
- Enter the following command: (change the region to match your region, and replace {guid} with the GUID you created earlier.)
aws s3api create-bucket --bucket samimages-{guid} --region us-east-1 --acl private