Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
1f327ef
chore(docs): Fixed broken link development guide (#3927)
lucashuy Jun 1, 2022
7368da3
fix(deploy): Fix output with events order long poll delay (#3919)
BourgoisMickael Jun 3, 2022
fe215c9
chore: Add safe teardown for accelerate integration test (#3933)
mingkun2020 Jun 6, 2022
6fa0213
feat: remove the created intermediate containers while building the l…
moelasmar Jun 6, 2022
0d7b318
feat: updating app templates repo hash with (6cbf1e1f858aaa2e7d02402c…
github-actions[bot] Jun 7, 2022
7a8a879
chore: Bump SamTranslator version to 1.46.0 (#3942)
aws-sam-cli-bot Jun 7, 2022
aac90d0
feat: updating app templates repo hash with (ae437cbf533bd156e7a5aab3…
github-actions[bot] Jun 7, 2022
c29c5a4
chore: bump version to 1.52.0 (#3944)
hawflau Jun 7, 2022
43e7cf3
chore: Update command option text (#3934)
mildaniel Jun 8, 2022
eda6089
feat: Add --s3-bucket and --s3-prefix to sam delete (#3915)
lucashuy Jun 8, 2022
c2822ba
chore: Sync code integration test for nested stack (#3943)
qingchm Jun 8, 2022
616e06b
Revert "feat: Add --s3-bucket and --s3-prefix to sam delete (#3915)" …
mndeveci Jun 9, 2022
33f4b97
Fix issue in cloning app templates repo in windows (#3950)
hawflau Jun 9, 2022
4b4e6e4
feat: Add in support for nested stack's code sync with Api's and Step…
qingchm Jun 10, 2022
136c347
test: Add ADL tests for nested and non-nested stacks (#3951)
mildaniel Jun 10, 2022
9eed7da
chore: nested stack integration tests for sam logs (#3930)
mndeveci Jun 10, 2022
9245fb9
fix: revert not creating ADL for empty dependencies (#3952)
mndeveci Jun 10, 2022
06d31fc
chore: sam sync & sam logs ux changes (#3953)
mndeveci Jun 10, 2022
6662242
Require Flask 1.1.4 (#3925)
dmarinuswoodwing Jun 14, 2022
6528403
feat: updating app templates repo hash with (5df174d5a1855c62b4cc6969…
github-actions[bot] Jun 16, 2022
0a78a0c
feat: Adding --s3-bucket and --s3-prefix to sam delete (#3969)
lucashuy Jun 16, 2022
1b2b2fd
bump cookiecutter version to address CVE (#3956)
hawflau Jun 16, 2022
25a28e0
chore: fix canary issues (#3978)
mndeveci Jun 17, 2022
c2b947d
chore: Clarify debug log message in build_context command (#3968)
Rabadash8820 Jun 21, 2022
153205e
fix: clean build folder before starting sync operation (#3982)
mndeveci Jun 21, 2022
cf8dce9
fix: Updated default option to Y for sync and added green colour to s…
lucashuy Jun 21, 2022
c45d70c
fix: Use cache build instead of incremental when building in containe…
mingkun2020 Jun 22, 2022
48d0460
bug: make sure all pullers in child combine puller also get stopped (…
mingkun2020 Jun 22, 2022
a301a44
feat: Add --resource option input validation for sync --code (#3992)
qingchm Jun 23, 2022
5ba7a87
chore: replace InvokeContextException with granular ones (#3966)
mndeveci Jun 23, 2022
0cf2622
chore(deps): bump Newtonsoft.Json in dotnet example (#3996)
dependabot[bot] Jun 23, 2022
078192a
fix: add sync state and context to check previous run details (#3989)
mndeveci Jun 23, 2022
c5c732a
chore: Update lambda builder version to 1.18.0 (#3999)
qingchm Jun 24, 2022
3d31c9f
feat: Adding --s3-bucket to sam sync (#3977)
lucashuy Jun 24, 2022
6110cb9
chore: fix java integration tests to use java8 runtime (#4002)
mndeveci Jun 24, 2022
9643fed
fix: add try/except for parse_time which is used by logs and traces c…
mndeveci Jun 27, 2022
96632c8
fix: issues with parallel build when using compiled languages (#4008)
mndeveci Jun 28, 2022
4b50b22
feat: updating app templates repo hash with (b057f88e4d4fe04acecbc22b…
github-actions[bot] Jun 29, 2022
8dda2ee
chore: bump version to 1.53.0 (#4014)
mndeveci Jun 29, 2022
2601a6a
chore: skip TestSyncAdlWithWatchStartWithNoDependencies on windows (#…
mndeveci Jun 29, 2022
9d15aa8
feat: remove accelerate beta experimental flag (#3973) (#3981)
mingkun2020 Jun 29, 2022
1a12e1d
Logging UnicodeDecodeError details in LocalApigwService._request_hand…
Lucas-C Jun 29, 2022
564fe95
Fix infinite deploy loop on small stack edge case (#4005)
BourgoisMickael Jun 30, 2022
939685b
chore: README.md Updated typo fixes done. (#4032)
prasadjivane Jul 8, 2022
0b9bf3a
feat: updating app templates repo hash with (dca20ade1b290262b6457006…
github-actions[bot] Jul 8, 2022
7c029f5
Adding blogposts and workshop material to readme (#3997)
praneetap Jul 8, 2022
d5bd26e
chore: Bump SamTranslator version to 1.47.0 (#4051)
aws-sam-cli-bot Jul 12, 2022
bdb8b96
fix: Don't use deps dir for non-cached builds (#4052)
mildaniel Jul 14, 2022
8456828
chore: Bump SamTranslator version to 1.48.0 (#4080)
aws-sam-cli-bot Jul 25, 2022
5f450a6
fix: Fixed describe stack events reporting wrong events (#4071)
lucashuy Jul 27, 2022
6d81fa4
Merge with current develop branch
Leo10Gama Jul 28, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DEVELOPMENT_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ contribute to the repository, there are a few more things to consider.
We support 3.7 and 3.8 versions. Our CI/CD pipeline is setup to run
unit tests against all Python versions. So make sure you test it
with all versions before sending a Pull Request.
See [Unit testing with multiple Python versions](#unit-testing-with-multiple-python-versions).
See [Unit testing with multiple Python versions](#unit-testing-with-multiple-python-versions-optional).

If you chose to use `pyenv` in the previous session, setting up a
different Python version should be easy:
Expand Down
21 changes: 15 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
[Installation](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html) | [Blogs](https://serverlessland.com/blog?tag=AWS%20SAM) | [Videos](https://serverlessland.com/video?tag=AWS%20SAM) | [AWS Docs](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/what-is-sam.html) | [Roadmap](https://github.com/aws/aws-sam-cli/wiki/SAM-CLI-Roadmap) | [Try It Out](https://s12d.com/Tq9ZE-Br)

The AWS Serverless Application Model (SAM) CLI is an open-source CLI tool that helps you develop serverless applications containing [Lambda functions](https://aws.amazon.com/lambda/), [Step Functions](https://aws.amazon.com/step-functions/), [API Gateway](https://aws.amazon.com/api-gateway/), [EventBridge](https://aws.amazon.com/eventbridge/), [SQS](https://aws.amazon.com/sqs/), [SNS](https://aws.amazon.com/sns/) and more. Some of the features it provides are:
- **Initialize serverless applications** in minutes with AWS provided infrastructure templates with `sam init`
- **Initialize serverless applications** in minutes with AWS-provided infrastructure templates with `sam init`
- **Compile, build, and package** Lambda functions with provided runtimes and with custom Makefile workflows, for zip and image types of Lambda functions with `sam build`
- **Locally test** a Lambda function and API Gateway easily in a Docker container with `sam local` commands on SAM and CDK applications
- **Sync and test your changes in the cloud** with `sam sync` in your developer environments
Expand All @@ -20,6 +20,16 @@ The AWS Serverless Application Model (SAM) CLI is an open-source CLI tool that h
- **Tail CloudWatch logs and X-Ray traces** with `sam log` and `sam trace`


## Recent blogposts and workshops

* **Develop Node projects with SAM CLI using esbuild (Beta)** - and use SAM Accelerate on Typescript projects. [Read blogpost here](https://s12d.com/5Aa6u0o7).

* **Speed up development with SAM Accelerate** - quickly test your changes in the cloud. [Read docs here](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/accelerate.html).

* **Getting started with CI/CD? SAM pipelines can help you get started** - [This workshop](https://s12d.com/_JQ48d5T) walks you through the basics.

* **Get started with Serverless Application development using SAM CLI** - [This workshop](https://s12d.com/Tq9ZE-Br) walks you through the basics.

## Get Started

To get started with building SAM-based applications, use the SAM CLI. SAM CLI provides a Lambda-like execution
Expand All @@ -33,13 +43,13 @@ environment that lets you locally build, test, debug, and deploy [AWS serverless


**Next Steps:** Learn to build a more complex serverless application.
* [Extract text from images and store in a database](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-example-s3.html) using Amazon S3 and Amazon Rekognition services.
* [Extract text from images and store it in a database](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-example-s3.html) using Amazon S3 and Amazon Rekognition services.
* [Detect when records are added to a database](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-example-ddb.html) using Amazon DynamoDB database and asynchronous stream processing.
* [Explore popular patterns](https://serverlessland.com/patterns)


## What is this Github repository? 💻
This Github Repository contains source code for SAM CLI. Here is the development team talking about this code:
This Github repository contains source code for SAM CLI. Here is the development team talking about this code:

> SAM CLI code is written in Python. Source code is well documented, very modular, with 95% unit test coverage.
It uses this awesome Python library called Click to manage the command line interaction and uses Docker to run Lambda functions locally.
Expand Down Expand Up @@ -70,17 +80,16 @@ to get started.

**Strengthen SAM CLI**

Add new commands or enhance existing ones, report bugs, or request new features for the SAM CLI.
Add new commands, enhance existing ones, report bugs, or request new features for the SAM CLI.
Source code is located on Github at [awslabs/aws-sam-cli](https://github.com/awslabs/aws-sam-cli). Read the [SAM CLI Contributing Guide](https://github.com/awslabs/aws-sam-cli/blob/develop/CONTRIBUTING.md) to
get started.

**Update SAM Developer Guide**

[SAM Developer Guide](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/index.html) provides comprehensive getting started guide and reference documentation.
[SAM Developer Guide](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/index.html) provides a comprehensive getting started guide and reference documentation.
Source code is located on Github at [awsdocs/aws-sam-developer-guide](https://github.com/awsdocs/aws-sam-developer-guide).
Read the [SAM Documentation Contribution Guide](https://github.com/awsdocs/aws-sam-developer-guide/blob/master/CONTRIBUTING.md) to get
started.

### Join the SAM Community on Slack
[Join the SAM developers channel (#samdev)](https://join.slack.com/t/awsdevelopers/shared_invite/zt-idww18e8-Z1kXhI7GNuDewkweCF3YjA) on Slack to collaborate with fellow community members and the AWS SAM team.

8 changes: 4 additions & 4 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
chevron~=0.12
click~=7.1
Flask~=1.1.2
Flask~=1.1.4
#Need to add Schemas latest SDK.
boto3>=1.19.5,==1.*
jmespath~=0.10.0
PyYAML~=5.3
cookiecutter~=1.7.2
aws-sam-translator==1.45.0
cookiecutter~=2.1.1
aws-sam-translator==1.48.0
#docker minor version updates can include breaking changes. Auto update micro version only.
docker~=4.2.0
dateparser~=1.0
requests==2.25.1
serverlessrepo==0.1.10
aws_lambda_builders==1.17.0
aws_lambda_builders==1.18.0
tomlkit==0.7.2
watchdog==2.1.2

Expand Down
35 changes: 15 additions & 20 deletions requirements/reproducible-linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ attrs==20.3.0 \
--hash=sha256:31b2eced602aa8423c2aea9c76a724617ed67cf9513173fd3a4f03e3a929c7e6 \
--hash=sha256:832aa3cde19744e49938b91fea06d69ecb9e649c93ba974535d08ad92164f700
# via jsonschema
aws-lambda-builders==1.17.0 \
--hash=sha256:1d296dc521f3f3f356ffbe290ca204713b1e8a24612262cf1c9283ffe34dc443 \
--hash=sha256:3eb7ca5ab71761766586db080a8b80ab81346b307fa72d5cea64ccd69fb41efe \
--hash=sha256:abae4ccfc419fc5cd8eebd4cc81e335ec7610f53804ce1aa2b655159ce339610
aws-lambda-builders==1.18.0 \
--hash=sha256:555c1bb72bab633deeb806cc347b40ed865d63166e536c89ff71f0ba739577b1 \
--hash=sha256:c0bd4b4288f0aa9cba27493065f5fb986425b5b49620b93a391620403eeb97e0 \
--hash=sha256:c5235699d36b8edda7e649fbc3a23ed868eda1e15c4a83528df33939bdb75754
# via aws-sam-cli (setup.py)
aws-sam-translator==1.45.0 \
--hash=sha256:40a6dd5a0aba32c7b38b0f5c54470396acdcd75e4b64251b015abdf922a18b5f \
--hash=sha256:bf321ab62aa1731d3e471fd55de6f5d1ab07dfc169cd254aa523dd9ad30246f9 \
--hash=sha256:cd4761c01902e5103e60202373275886e59edcc778edf18ca22d380059ed44e7
aws-sam-translator==1.48.0 \
--hash=sha256:7171037323dfa30f8f73e9bccb9210e4c384a585e087219a9518a5204f0a2c44 \
--hash=sha256:be18dfa3dfe7ab291d281667c5f73ac62dbe6bfe86df7d122e4258b906b736f0 \
--hash=sha256:ca4f8f9910d7713aeaba59346775bfb3198f6acb47c6704572f9bd3fc0fb5bf0
# via aws-sam-cli (setup.py)
backports-zoneinfo==0.2.1 \
--hash=sha256:17746bd546106fa389c51dbea67c8b7c8f0d14b5526a579ca6ccf5ed72c526cf \
Expand Down Expand Up @@ -78,9 +78,9 @@ click==7.1.2 \
# aws-sam-cli (setup.py)
# cookiecutter
# flask
cookiecutter==1.7.3 \
--hash=sha256:6b9a4d72882e243be077a7397d0f1f76fe66cf3df91f3115dbb5330e214fa457 \
--hash=sha256:f8671531fa96ab14339d0c59b4f662a4f12a2ecacd94a0f70a3500843da588e2
cookiecutter==2.1.1 \
--hash=sha256:9f3ab027cec4f70916e28f03470bdb41e637a3ad354b4d65c765d93aad160022 \
--hash=sha256:f3982be8d9c53dac1261864013fdec7f83afd2e42ede6f6dd069c5e149c540d5
# via aws-sam-cli (setup.py)
dateparser==1.0.0 \
--hash=sha256:159cc4e01a593706a15cd4e269a0b3345edf3aef8bf9278a57dac8adf5bf1e4a \
Expand All @@ -90,9 +90,9 @@ docker==4.2.2 \
--hash=sha256:03a46400c4080cb6f7aa997f881ddd84fef855499ece219d75fbdb53289c17ab \
--hash=sha256:26eebadce7e298f55b76a88c4f8802476c5eaddbdbe38dbc6cce8781c47c9b54
# via aws-sam-cli (setup.py)
flask==1.1.2 \
--hash=sha256:4efa1ae2d7c9865af48986de8aeb8504bf32c7f3d6fdc9353d34b21f4b127060 \
--hash=sha256:8a4fdd8936eba2512e9c85df320a37e694c93945b33ef33c89946a340a238557
flask==1.1.4 \
--hash=sha256:0fbeb6180d383a9186d0d6ed954e0042ad9f18e0e8de088b2b419d526927d196 \
--hash=sha256:c34f04500f2cbbea882b1acb02002ad6fe6b7ffa64a6164577995657f50aed22
# via aws-sam-cli (setup.py)
idna==2.10 \
--hash=sha256:b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6 \
Expand Down Expand Up @@ -201,10 +201,6 @@ markupsafe==2.0.1 \
# via
# aws-sam-cli (setup.py)
# jinja2
poyo==0.5.0 \
--hash=sha256:3e2ca8e33fdc3c411cd101ca395668395dd5dc7ac775b8e809e3def9f9fe041a \
--hash=sha256:e26956aa780c45f011ca9886f044590e2d8fd8b61db7b1c1cf4e0869f48ed4dd
# via cookiecutter
pyrsistent==0.17.3 \
--hash=sha256:2e636185d9eb976a18a8a8e96efce62f2905fea90041958d8cc2a189756ebf3e
# via jsonschema
Expand Down Expand Up @@ -254,6 +250,7 @@ pyyaml==5.4.1 \
--hash=sha256:fe69978f3f768926cfa37b867e3843918e012cf83f680806599ddce33c2c68b0
# via
# aws-sam-cli (setup.py)
# cookiecutter
# serverlessrepo
regex==2021.9.30 \
--hash=sha256:0de8ad66b08c3e673b61981b9e3626f8784d5564f8c3928e2ad408c0eb5ac38c \
Expand Down Expand Up @@ -319,8 +316,6 @@ six==1.15.0 \
--hash=sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259 \
--hash=sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced
# via
# aws-lambda-builders
# cookiecutter
# docker
# jsonschema
# python-dateutil
Expand Down
2 changes: 1 addition & 1 deletion samcli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
SAM CLI version
"""

__version__ = "1.51.0"
__version__ = "1.53.0"
70 changes: 70 additions & 0 deletions samcli/commands/_utils/command_exception_handler.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
"""
Contains method decorator which can be used to convert common exceptions into click exceptions
which will end exeecution gracefully
"""
from functools import wraps
from typing import Callable, Dict, Any, Optional

from botocore.exceptions import NoRegionError, ClientError

from samcli.commands._utils.options import parameterized_option
from samcli.commands.exceptions import CredentialsError, RegionError
from samcli.lib.utils.boto_utils import get_client_error_code


@parameterized_option
def command_exception_handler(f, additional_mapping: Optional[Dict[Any, Callable[[Any], None]]] = None):
"""
This function returns a wrapped function definition, which handles configured exceptions gracefully
"""

def decorator_command_exception_handler(func):
@wraps(func)
def wrapper_command_exception_handler(*args, **kwargs):
try:
return func(*args, **kwargs)
except Exception as ex:
exception_type = type(ex)

# check if there is a custom handling defined
exception_handler = (additional_mapping or {}).get(exception_type)
if exception_handler:
exception_handler(ex)

# if no custom handling defined search for default handlers
exception_handler = COMMON_EXCEPTION_HANDLER_MAPPING.get(exception_type)
if exception_handler:
exception_handler(ex)

# if no handler defined, raise the exception
raise ex

return wrapper_command_exception_handler

return decorator_command_exception_handler(f)


def _handle_no_region_error(ex: NoRegionError) -> None:
raise RegionError(
"No region information found. Please provide --region parameter or configure default region settings. "
"\nFor more information please visit https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/"
"setup-credentials.html#setup-credentials-setting-region"
)


def _handle_client_errors(ex: ClientError) -> None:
error_code = get_client_error_code(ex)

if error_code in ("ExpiredToken", "ExpiredTokenException"):
raise CredentialsError(
"Your credential configuration is invalid or has expired token value. \nFor more information please "
"visit: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html"
)

raise ex


COMMON_EXCEPTION_HANDLER_MAPPING: Dict[Any, Callable] = {
NoRegionError: _handle_no_region_error,
ClientError: _handle_client_errors,
}
3 changes: 1 addition & 2 deletions samcli/commands/_utils/experimental.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ class ExperimentalFlag:
"""Class for storing all experimental related ConfigEntries"""

All = ExperimentalEntry("experimentalAll", EXPERIMENTAL_ENV_VAR_PREFIX + "FEATURES")
Accelerate = ExperimentalEntry("experimentalAccelerate", EXPERIMENTAL_ENV_VAR_PREFIX + "ACCELERATE")
Esbuild = ExperimentalEntry("experimentalEsbuild", EXPERIMENTAL_ENV_VAR_PREFIX + "ESBUILD")


Expand Down Expand Up @@ -240,7 +239,7 @@ def prompt_experimental(
if is_experimental_enabled(config_entry):
update_experimental_context()
return True
confirmed = click.confirm(prompt, default=False)
confirmed = click.confirm(Colored().yellow(prompt), default=False)
if confirmed:
set_experimental(config_entry=config_entry, enabled=True)
update_experimental_context()
Expand Down
14 changes: 7 additions & 7 deletions samcli/commands/_utils/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,12 +367,11 @@ def common_observability_click_options():
"-t",
is_flag=True,
help="Tail events. This will ignore the end time argument and continue to fetch events as they "
"become available. [Beta Feature] If in beta --tail without a --name will pull from all possible resources",
"become available. If option --tail without a --name will pull from all possible resources",
),
click.option(
"--output",
help="""
[Beta Feature]
The formatting style of the command output. Following options are available:\n
TEXT: Prints information as regular text with some formatting (default option)\n
JSON: Prints each line as JSON without formatting
Expand Down Expand Up @@ -474,19 +473,20 @@ def stack_name_option(f, required=False, callback=None):
return stack_name_click_option(required, callback)(f)


def s3_bucket_click_option(guided):
callback = None if guided else partial(artifact_callback, artifact=ZIP)
def s3_bucket_click_option(disable_callback):
callback = None if disable_callback else partial(artifact_callback, artifact=ZIP)

return click.option(
"--s3-bucket",
required=False,
callback=callback,
help="The name of the S3 bucket where this command uploads the artifacts that are referenced in your template.",
callback=callback,
)


@parameterized_option
def s3_bucket_option(f, guided=False):
return s3_bucket_click_option(guided)(f)
def s3_bucket_option(f, disable_callback=False):
return s3_bucket_click_option(disable_callback)(f)


def build_dir_click_option():
Expand Down
7 changes: 5 additions & 2 deletions samcli/commands/_utils/table_print.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,17 @@
MIN_OFFSET = 20


def pprint_column_names(format_string, format_kwargs, margin=None, table_header=None, color="yellow"):
def pprint_column_names(
format_string, format_kwargs, margin=None, table_header=None, color="yellow", display_sleep=False
):
"""

:param format_string: format string to be used that has the strings, minimum width to be replaced
:param format_kwargs: dictionary that is supplied to the format_string to format the string
:param margin: margin that is to be reduced from column width for columnar text.
:param table_header: Supplied table header
:param color: color supplied for table headers and column names.
:param display_sleep: flag to format table_header to include deployer's client_sleep
:return: boilerplate table string
"""

Expand Down Expand Up @@ -59,7 +62,7 @@ def pprint_wrap(func):
def wrap(*args, **kwargs):
# The table is setup with the column names, format_string contains the column names.
if table_header:
click.secho("\n" + table_header)
click.secho("\n" + table_header.format(args[0].client_sleep) if display_sleep else table_header)
click.secho("-" * usable_width, fg=color)
click.secho(format_string.format(*format_args, **format_kwargs), fg=color)
click.secho("-" * usable_width, fg=color)
Expand Down
6 changes: 5 additions & 1 deletion samcli/commands/build/build_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,10 @@ def manifest_path_override(self) -> Optional[str]:
def mode(self) -> Optional[str]:
return self._mode

@property
def use_base_dir(self) -> bool:
return self._use_raw_codeuri

@property
def resources_to_build(self) -> ResourcesToBuildCollector:
"""
Expand Down Expand Up @@ -568,7 +572,7 @@ def _is_function_buildable(function: Function):
docker_context = cast(str, metadata.get("DockerContext", ""))
if not dockerfile or not docker_context:
LOG.debug(
"Skip Building %s function, as it does not contain either Dockerfile or DockerContext "
"Skip Building %s function, as it is missing either Dockerfile or DockerContext "
"metadata properties.",
function.full_path,
)
Expand Down
Loading