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

chore: use cdk #1

Closed
wants to merge 2 commits into from
Closed

chore: use cdk #1

wants to merge 2 commits into from

Conversation

pseudo-su
Copy link
Owner

@pseudo-su pseudo-su commented Jul 24, 2021

Switch to using the CDK directly instead of SST. Attempting to use the sam-beta-cdk to facliitate local development.

Currently the sam-beta-cdk panic's with the following error when trying to run the APIs locally

> sam-beta-cdk local start-api

Synthesizing CDK App
Traceback (most recent call last):
  File "/usr/local/bin/sam-beta-cdk", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/Cellar/aws-sam-cli-beta-cdk/202107140310/libexec/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/Cellar/aws-sam-cli-beta-cdk/202107140310/libexec/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/Cellar/aws-sam-cli-beta-cdk/202107140310/libexec/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/Cellar/aws-sam-cli-beta-cdk/202107140310/libexec/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/Cellar/aws-sam-cli-beta-cdk/202107140310/libexec/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/Cellar/aws-sam-cli-beta-cdk/202107140310/libexec/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/Cellar/aws-sam-cli-beta-cdk/202107140310/libexec/lib/python3.8/site-packages/samcli/lib/iac/utils/helpers.py", line 50, in wrapper
    iac_plugin, project = get_iac_plugin(project_type, kwargs, with_build)
  File "/usr/local/Cellar/aws-sam-cli-beta-cdk/202107140310/libexec/lib/python3.8/site-packages/samcli/lib/iac/utils/helpers.py", line 40, in get_iac_plugin
    project = iac_plugin.get_project(lookup_paths)
  File "/usr/local/Cellar/aws-sam-cli-beta-cdk/202107140310/libexec/lib/python3.8/site-packages/samcli/lib/iac/cdk/plugin.py", line 114, in get_project
    project = self._get_project_from_cloud_assembly(cloud_assembly_dir)
  File "/usr/local/Cellar/aws-sam-cli-beta-cdk/202107140310/libexec/lib/python3.8/site-packages/samcli/lib/iac/cdk/plugin.py", line 211, in _get_project_from_cloud_assembly
    stacks: List[Stack] = [self._build_stack(cloud_assembly, ca_stack) for ca_stack in cloud_assembly.stacks]
  File "/usr/local/Cellar/aws-sam-cli-beta-cdk/202107140310/libexec/lib/python3.8/site-packages/samcli/lib/iac/cdk/plugin.py", line 211, in <listcomp>
    stacks: List[Stack] = [self._build_stack(cloud_assembly, ca_stack) for ca_stack in cloud_assembly.stacks]
  File "/usr/local/Cellar/aws-sam-cli-beta-cdk/202107140310/libexec/lib/python3.8/site-packages/samcli/lib/iac/cdk/plugin.py", line 232, in _build_stack
    self._build_resources_section(assets, ca_stack, cloud_assembly, section, section_dict)
  File "/usr/local/Cellar/aws-sam-cli-beta-cdk/202107140310/libexec/lib/python3.8/site-packages/samcli/lib/iac/cdk/plugin.py", line 292, in _build_resources_section
    asset = assets[asset_path]
KeyError: '/Development/golang-serverless-cdk-template/.aws-sam/.cdk-out/asset.11b1fbd97647ec3b4f3f2f3fd5c7fa53f0386bfd5cc831be00cb829546b5e262'
make: *** [dev] Error 1

@pseudo-su pseudo-su closed this Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant