LazyStack

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.

  1. Install/Update Visual Studio 2022 for Mac
  2. Configure Visual Studio for Mac External Tools
    1. Open Visual Studio for Mac
    2. Add LazyStack -- Generate Projects tool
      1. Select Tools→Edit Custom Tools. The External Tools Panel appears.
      2. Click the Add button. "New Tool" is added to the tools list.
      3. Select "New Tool".
      4. Edit Title to read "LazyStack - Generate Projects"
      5. Edit Command to read "/Users/yourlogin/.dotnet/lazystack". Be sure to replace yourlogin with your mac user name.
      6. Edit Arguments to read "projects"
      7. Edit Working Directory to read "${SolutionDir}"".
      8. Make sure Use output Window is checked.
    3. Add SAM Publish AWS Stack tool
      1. Click the Add button. "New Tool" is added to the tools list.
      2. Select "New Tool".
      3. Edit Title to read "SAM Publish AWS Stack"
      4. Edit Command to read "sam".
      5. 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.
      6. Edit Arguments to read "deploy -t Stacks/Dev/serverless.template --stack-name ${SolutionName}Dev --s3-bucket samimages-{guid} --capabilities CAPABILITY_NAMED_IAM"
      7. Edit Working Directory to read "${SolutionDir}"".
      8. Make sure Use output Window is checked.
    4. Add LazyStack -- Generate Stacks\Dev\AwsSettings.json tool
      1. Click the Add button. "New Tool" is added to the tools list.
      2. Select "New Tool".
      3. Edit Title to read "LazyStack - Generate Stacks\Dev\AwsSettings.json"
      4. Edit Command to read "/Users/yourlogin/.dotnet/lazystack". Be sure to replace yourlogin with your mac user name.
      5. Edit Arguments to read "settings ${SolutionName}Dev Stacks/Dev/AwsSettings.json"
      6. Edit Working Directory to read "${SolutionDir}"".
      7. Make sure Use output Window is checked.
      8. Click the OK button. The External Tools Panel closes.
    5. Use AWS CLI to add a S3 samimages bucket
      1. Open a Terminal.
      2. 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