Saravanan666/pypi-org huggingface dataset:
Package: aws-cdk.lambda-layer-kubectl
AWS Lambda Layer with kubectl (and helm)---AWS CDK v1 has reached End-of-Support on 2023-06-01.
This package is no longer being updated, and users should migrate to AWS CDK v2.For more information on how to migrate, see theMigrating to AWS CDK v2guide.This module exports a single class calledKubectlLayerwhich is alambda.Layerthat bundles thekubectland thehelmcommand line.Helm Version: 3.5.4Kubectl Version: 1.20.0Usage:# KubectlLayer bundles the 'kubectl' and 'helm' command linesfromaws_cdk.lambda_layer_kubectlimportKubectlLayer# fn: lambda.Functionfn.add_layers(KubectlLayer(self,"KubectlLayer"))kubectlwill be installed under/opt/kubectl/kubectl, andhelmwill be installed under/opt/helm/helm.
Package: aws-cdk.lambda-layer-kubectl-v21
Lambda Layer with KubeCtl v1.21---This module exports a single class calledKubectlLayerwhich is alambda.LayerVersionthat
bundles thekubectland thehelmcommand line.Helm Version: 3.9.4Kubectl Version: 1.21.0Usage://KubectlLayerbundlesthe'kubectl'and'helm'commandlinesimport{KubectlLayer}from'@aws-cdk/lamba-layer-kubectl-v21';import*aslambdafrom'aws-cdk-lib/aws-lambda';declareconstfn:lambda.Function;constkubectl=newKubectlLayer(this,'KubectlLayer');fn.addLayers(kubectl);kubectlwill be installed under/opt/kubectl/kubectl, andhelmwill be installed under/opt/helm/helm.
Package: aws-cdk.lambda-layer-kubectl-v22
Lambda Layer with KubeCtl v1.22---This module exports a single class calledKubectlV22Layerwhich is alambda.LayerVersionthat
bundles thekubectland thehelmcommand line.Helm Version: 3.9.4Kubectl Version: 1.22.0Usage://KubectlLayerbundlesthe'kubectl'and'helm'commandlinesimport{KubectlV22Layer}from'@aws-cdk/lambda-layer-kubectl-v22';import*aslambdafrom'aws-cdk-lib/aws-lambda';declareconstfn:lambda.Function;constkubectl=newKubectlV22Layer(this,'KubectlLayer');fn.addLayers(kubectl);kubectlwill be installed under/opt/kubectl/kubectl, andhelmwill be installed under/opt/helm/helm.
Package: aws-cdk.lambda-layer-kubectl-v23
Lambda Layer with KubeCtl v1.23---This module exports a single class calledKubectlV23Layerwhich is alambda.LayerVersionthat
bundles thekubectland thehelmcommand line.Helm Version: 3.9.4Kubectl Version: 1.23.0Usage://KubectlLayerbundlesthe'kubectl'and'helm'commandlinesimport{KubectlV23Layer}from'@aws-cdk/lambda-layer-kubectl-v23';import*aslambdafrom'aws-cdk-lib/aws-lambda';declareconstfn:lambda.Function;constkubectl=newKubectlV23Layer(this,'KubectlLayer');fn.addLayers(kubectl);kubectlwill be installed under/opt/kubectl/kubectl, andhelmwill be installed under/opt/helm/helm.
Package: aws-cdk.lambda-layer-kubectl-v24
Lambda Layer with KubeCtl v1.24---This module exports a single class calledKubectlV24Layerwhich is alambda.LayerVersionthat
bundles thekubectland thehelmcommand line.Helm Version: 3.9.4Kubectl Version: 1.24.0Usage://KubectlLayerbundlesthe'kubectl'and'helm'commandlinesimport{KubectlV24Layer}from'@aws-cdk/lambda-layer-kubectl-v24';import*aslambdafrom'aws-cdk-lib/aws-lambda';declareconstfn:lambda.Function;constkubectl=newKubectlV24Layer(this,'KubectlLayer');fn.addLayers(kubectl);kubectlwill be installed under/opt/kubectl/kubectl, andhelmwill be installed under/opt/helm/helm.
Package: aws-cdk.lambda-layer-kubectl-v25
Lambda Layer with KubeCtl v1.25---This module exports a single class calledKubectlV25Layerwhich is alambda.LayerVersionthat
bundles thekubectland thehelmcommand line.Helm Version: 3.11.1Kubectl Version: 1.25.0Usage://KubectlLayerbundlesthe'kubectl'and'helm'commandlinesimport{KubectlV25Layer}from'@aws-cdk/lambda-layer-kubectl-v25';import*aslambdafrom'aws-cdk-lib/aws-lambda';declareconstfn:lambda.Function;constkubectl=newKubectlV25Layer(this,'KubectlLayer');fn.addLayers(kubectl);kubectlwill be installed under/opt/kubectl/kubectl, andhelmwill be installed under/opt/helm/helm.
Package: aws-cdk.lambda-layer-kubectl-v26
Lambda Layer with KubeCtl v1.26---This module exports a single class calledKubectlV26Layerwhich is alambda.LayerVersionthat
bundles thekubectland thehelmcommand line.Helm Version: 3.11.1Kubectl Version: 1.26.4Usage://KubectlLayerbundlesthe'kubectl'and'helm'commandlinesimport{KubectlV26Layer}from'@aws-cdk/lambda-layer-kubectl-v26';import*aslambdafrom'aws-cdk-lib/aws-lambda';declareconstfn:lambda.Function;constkubectl=newKubectlV26Layer(this,'KubectlLayer');fn.addLayers(kubectl);kubectlwill be installed under/opt/kubectl/kubectl, andhelmwill be installed under/opt/helm/helm.
Package: aws-cdk.lambda-layer-kubectl-v27
Lambda Layer with KubeCtl v1.27---This module exports a single class calledKubectlV27Layerwhich is alambda.LayerVersionthat
bundles thekubectland thehelmcommand line.Helm Version: 3.12.1Kubectl Version: 1.27.1Usage://KubectlLayerbundlesthe'kubectl'and'helm'commandlinesimport{KubectlV27Layer}from'@aws-cdk/lambda-layer-kubectl-v27';import*aslambdafrom'aws-cdk-lib/aws-lambda';declareconstfn:lambda.Function;constkubectl=newKubectlV27Layer(this,'KubectlLayer');fn.addLayers(kubectl);kubectlwill be installed under/opt/kubectl/kubectl, andhelmwill be installed under/opt/helm/helm.
Package: aws-cdk.lambda-layer-kubectl-v28
Lambda Layer with KubeCtl v1.28---This module exports a single class calledKubectlV28Layerwhich is alambda.LayerVersionthat
bundles thekubectland thehelmcommand line.Helm Version: 3.14.0Kubectl Version: 1.28.3Usage://KubectlLayerbundlesthe'kubectl'and'helm'commandlinesimport{KubectlV28Layer}from'@aws-cdk/lambda-layer-kubectl-v28';import*aslambdafrom'aws-cdk-lib/aws-lambda';declareconstfn:lambda.Function;constkubectl=newKubectlV28Layer(this,'KubectlLayer');fn.addLayers(kubectl);kubectlwill be installed under/opt/kubectl/kubectl, andhelmwill be installed under/opt/helm/helm.
Package: aws-cdk.lambda-layer-kubectl-v29
Lambda Layer with KubeCtl v1.29---This module exports a single class calledKubectlV29Layerwhich is alambda.LayerVersionthat
bundles thekubectland thehelmcommand line.Helm Version: 3.14.0Kubectl Version: 1.29.1Usage://KubectlLayerbundlesthe'kubectl'and'helm'commandlinesimport{KubectlV29Layer}from'@aws-cdk/lambda-layer-kubectl-v29';import*aslambdafrom'aws-cdk-lib/aws-lambda';declareconstfn:lambda.Function;constkubectl=newKubectlV29Layer(this,'KubectlLayer');fn.addLayers(kubectl);kubectlwill be installed under/opt/kubectl/kubectl, andhelmwill be installed under/opt/helm/helm.
Package: aws-cdk.lambda-layer-node-proxy-agent
AWS Lambda Layer with the NPM dependency proxy-agent---This module exports a single class calledNodeProxyAgentLayerwhich is alambda.Layerthat bundles the NPM dependencyproxy-agent.proxy-agent Version: 5.0.0Usage:fromaws_cdk.lambda_layer_node_proxy_agentimportNodeProxyAgentLayerimportaws_cdk.aws_lambdaaslambda_# fn: lambda.Functionfn.add_layers(NodeProxyAgentLayer(self,"NodeProxyAgentLayer"))proxy-agentwill be installed under/nodejs/node_modules.
Package: aws-cdk-lambda-poetry-asset
AWS CDK Lambda Poetry AssetAboutThis is the cdk v2 version of the original asset, which is available atgitlab.AWS CDK currently supports 3 kinds of "Assets":InlineCode- useful for one-line-lambdasAssetCode- one-file lambdas without dependenciesS3Code- existing lambda packages already uploaded in an S3 bucketThere is, however, no support for more complex lambda function which require third party dependencies.
This repository presents one possible approach to lambda packaging.The construct is aware of libraries bundled in the AWS lambda runtime and automatically removes those for you to save space.It also counts with compiled C dependencies such as NumPy and takes care of library stripping.By setting thecreate_file_if_existstoFalseyou can use it with a caching system, like Github Actionsactions/cache@v3. It will only run the build if the file doesnt exist at the output path already.UsageSuppose your project's directory structure looks like this:my-project
├── business_logic
│   └── backend.py
└── functions
    └── my_lambda.pyThen your stack would be:frompathlibimportPathfromaws_cdkimportaws_lambdafromaws_cdk_lambda_poetry_asset.zip_asset_codeimportZipAssetCodeclassMyStack(core.Stack):def__init__(self,app:core.App,id:str,**kwargs)->None:super().__init__(app,id,**kwargs)work_dir=Path(__file__).parents[1]aws_lambda.Function(scope=self,id='MyLambda',code=ZipAssetCode(work_dir=work_dir,include=['functions','business_logic'],file_name='my-lambda.zip',create_file_if_exists=False)handler='functions/my_lambda.lambda_handler',runtime=aws_lambda.Runtime.PYTHON_3_9)SetupInstall poetrypip install poetryInstall dependenciespoetry updateRun testsStart docker first.poetry run pytest --cov-report term-missing --cov=aws_cdk_lambda_poetry_asset testsCreate a releaseThis project will automatically create a github release when a PR is merged into themainbranch. The title of the PR must adhere toangular commit message formatin order for it to calculate a new version number.Example PR titles:feat: mindblowing featurefix: bug thats been around for everTypesFrom angular documentationMust be one of the following:build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)ci: Changes to our CI configuration files and scripts (example scopes: Circle, BrowserStack, SauceLabs)docs: Documentation only changesfeat: A new featurefix: A bug fixperf: A code change that improves performancerefactor: A code change that neither fixes a bug nor adds a featuretest: Adding missing tests or correcting existing testsLicenseThis code is released under MIT license.
Package: aws-cdk-lambdecor
aws-cdk-lambdecorTransform native python function intoAWS CDK Custom Resources.fromaws_cdk_lambdecorimportaws_lambdafromaws_cdkimportcoreascdkapp=cdk.App()stack=cdk.Stack(app,'HelloLambdecor')@aws_lambda(stack)defgreet():return'hello'# invoke the function just like a regular functiongreeting=greet()# return value is a token that can be used later oncdk.CfnOutput(stack,'Greeting',value=greeting)app.synth()You can also use tokens:fromaws_cdk_lambdecorimportaws_lambdafromaws_cdkimportcoreascdkfromaws_cdkimports3fromaws_cdkimportaws_apigatewayasapigatewayapp=cdk.App()stack=cdk.Stack(app,'HelloLambdecor')@aws_lambda(stack)defping(url):http=urllib3.PoolManager()r=http.request('GET',url)returnr.statusapi=apigateway.LambdaRestApi(...)status=ping(api.url)cdk.CfnOutput(stack,'Status',value=status)app.synth()RuntimeThe Custom Resource is created with thePython3.6 Lambda RuntimeImportsThe following modules are pre-imported into the lambda environment:jsonurllib3To use any other module, you would need to do an inline import.Installpip install aws-cdk-lambdecorPossible Future WorkSupport customizing all properties of the CDK Lambda Function (i.e runtime, memory, environment...)Pre-import additional common libraries.Implicit CDK scope creation to support CDK applications consisting of just these lambda functions.Implicit creation of Stack output.Command line invocation of function that runscdk deployand parses the stack output. (i.eresult=$(aws-cdk-lamdecor invoke func.py))
Package: aws-cdk.region-info
AWS Region-Specific Information DirectoryUsageSome information used in CDK Applications differs from one AWS region to
another, such as service principals used in IAM policies, S3 static website
endpoints, ...TheRegionInfoclassThe library offers a simple interface to obtain region specific information in
the form of theRegionInfoclass. This is the preferred way to interact with
the regional information database:# Get the information for "eu-west-1":region=region_info.RegionInfo.get("eu-west-1")# Access attributes:region.s3_static_website_endpoint# s3-website-eu-west-1.amazonaws.comregion.service_principal("logs.amazonaws.com")TheRegionInfolayer is built on top of the Low-Level API, which is described
below and can be used to register additional data, including user-defined facts
that are not available through theRegionInfointerface.Low-Level APIThis library offers a primitive database of such information so that CDK
constructs can easily access regional information. TheFactNameclass provides
a list of known fact names, which can then be used with theRegionInfoto
retrieve a particular value:code_deploy_principal=region_info.Fact.find("us-east-1",region_info.FactName.service_principal("codedeploy.amazonaws.com"))# => codedeploy.us-east-1.amazonaws.comstatic_website=region_info.Fact.find("ap-northeast-1",region_info.FactName.S3_STATIC_WEBSITE_ENDPOINT)Supplying new or missing informationAs new regions are released, it might happen that a particular fact you need is
missing from the library. In such cases, theFact.registermethod can be used
to inject FactName into the database:@jsii.implements(region_info.IFact)classMyFact:region_info.Fact.register(MyFact())Overriding incorrect informationIn the event information provided by the library is incorrect, it can be
overridden using the sameFact.registermethod demonstrated above, simply
adding an extra boolean argument:@jsii.implements(region_info.IFact)classMyFact:region_info.Fact.register(MyFact(),True)If you happen to have stumbled upon incorrect data built into this library, it
is always a good idea to report your findings in aGitHub issue, so we can fix
it for everyone else!This module is part of theAWS Cloud Development Kitproject.
Package: aws-cdk-ssm-sdk-parameter
aws-cdk-ssm-sdk-parameterThats an AWS CDK Construct for get and set the value of an SSM parameter. It is designed to be loose coupled and be not managed through AWS CDK / Cloudformation so that the SSM parameter can exist across different stacks and be updated without causing a drift. The looseness is reached through using CFN Custom Resources.The implementation simply leveragesAwsCustomResourceas an SDK wrapper for:https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ssm/get-parameter.htmlhttps://docs.aws.amazon.com/systems-manager/latest/APIReference/API_GetParameter.htmlhttps://awscli.amazonaws.com/v2/documentation/api/latest/reference/ssm/put-parameter.htmlhttps://docs.aws.amazon.com/systems-manager/latest/APIReference/API_PutParameter.htmlhttps://awscli.amazonaws.com/v2/documentation/api/latest/reference/ssm/delete-parameter.htmlhttps://docs.aws.amazon.com/systems-manager/latest/APIReference/API_DeleteParameter.htmlFeaturesIf the parameter doesn't exist, it will be created. Otherwise it pulls the current value of the parameter.optional delete when destroying the stackUse CaseInitialize a parameter to some value upon creation, but allow it to diverge during future CDK deployments.SSM StringParameter APP_VERSION of an image is used across ECS deployments. New ECS deployments use that latest version value in it. APP_VERSION isn't managed / editable with CDK but if APP_VERSION wouldn't exist you can specify kind of default.Example# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826stack=cdk.Stack(app,"ssm-demo-stack",env=env)# Create a loose coupled SSM Parameter from type StringSSMParameter(stack,"SSMParameter",parameter_name="fooString",default_value="fooValue")# Create a loose coupled SSM Parameter from type StringListSSMParameter(stack,"SSMParameterStringList",parameter_name="fooStringList",default_value="fooValue1,fooValue2,fooValue3",type=SSMParameterType.StringList)# Delete the SSM Parameter if the stack gets deletedSSMParameter(stack,"SSMParameterWithDelete",parameter_name="fooWithDelete",default_value="fooValue",delete=True)Local TestingFor local testing simply runyarn deploy --profile XFor destroying useyarn destroy --profile XLimitationSSM SecureString Parameter are not supporteddefault description are not supported
Package: aws-cdk-test-synth
AWS CDK test Synth package is implemented for helping you to test your AWS CDK code.The goal is to cover the missing of anofficial testing infrastructureforPythonas exists forTypeScriptusingJest.It is part of theeducational repositoriesto learn how to write stardard code and common uses of the TDD.PrerequisitesThis package is useful for testing yourAWS CDKcode, so you probably have everything you need installed already.InstallationIf you want to use this package into your code, you can install by python3-pip:pip3installaws_cdk_test_synthpython3>>>importaws_cdk_test_synth.test_synthasTestSynth>>>help(TestSynth)Read the documentation onreadthedocsforUsageDevelopmentChange LogSeeCHANGELOG.mdfor details.LicenseThis package is released under the MIT license.  SeeLICENSEfor details.
Package: aws-cdk.triggers
Triggers---AWS CDK v1 has reached End-of-Support on 2023-06-01.
This package is no longer being updated, and users should migrate to AWS CDK v2.For more information on how to migrate, see theMigrating to AWS CDK v2guide.Triggers allows you to execute code during deployments. This can be used for a
variety of use cases such as:Self tests: validate something after a resource/construct been provisionedData priming: add initial data to resources after they are createdPreconditions: check things such as account limits or external dependencies
before deployment.UsageTheTriggerFunctionconstruct will define an AWS Lambda function which is
triggeredduringdeployment:importaws_cdk.aws_lambdaaslambda_importaws_cdk.triggersastriggersfromaws_cdk.coreimportStack# stack: Stacktriggers.TriggerFunction(stack,"MyTrigger",runtime=lambda_.Runtime.NODEJS_14_X,handler="index.handler",code=lambda_.Code.from_asset(__dirname+"/my-trigger"))In the above example, the AWS Lambda function defined inmyLambdaFunctionwill
be invoked when the stack is deployed.Trigger FailuresIf the trigger handler fails (e.g. an exception is raised), the CloudFormation
deployment will fail, as if a resource failed to provision. This makes it easy
to implement "self tests" via triggers by simply making a set of assertions on
some provisioned infrastructure.Order of ExecutionBy default, a trigger will be executed by CloudFormation after the associated
handler is provisioned. This means that if the handler takes an implicit
dependency on other resources (e.g. via environment variables), those resources
will be provisionedbeforethe trigger is executed.In most cases, implicit ordering should be sufficient, but you can also useexecuteAfterandexecuteBeforeto control the order of execution.The following example defines the following order:(hello, world) => myTrigger => goodbye.
The resources underhelloandworldwill be provisioned in
parallel, and then the triggermyTriggerwill be executed. Only then the
resources undergoodbyewill be provisioned:fromconstructsimportConstruct,Nodeimportaws_cdk.triggersastriggers# my_trigger: triggers.Trigger# hello: Construct# world: Construct# goodbye: Constructmy_trigger.execute_after(hello,world)my_trigger.execute_before(goodbye)Note thathelloandworldare constructscopes. This means that they can
be specific resources (such as ans3.Bucketobject) or groups of resources
composed together into constructs.Re-execution of TriggersBy default,executeOnHandlerChangeis enabled. This implies that the trigger
is re-executed every time the handler function code or configuration changes. If
this option is disabled, the trigger will be executed only once upon first
deployment.In the future we will consider adding support for additional re-execution modes:executeOnEveryDeployment: boolean- re-executes every time the stack is
deployed (add random "salt" during synthesis).executeOnResourceChange: Construct[]- re-executes when one of the resources
under the specified scopes has changed (add the hash the CloudFormation
resource specs).
Package: aws-cdk.zip-asset-code
fromaws_cdkimportaws_lambdaaslambda_fromaws_cdk.zip_asset_codeimportZipAssetCodelambda_.Function(stack,'ExampleLambdaFunction',code=ZipAssetCode('example-lambda/'),handler='handler.handler',runtime=lambda_.Runtime.PYTHON_3_8)(snippet fromexample-cdk-lambda.py)
Package: aws_cfn_custom_resource_resolve_parser
Small lib to parse and retrieve secret from AWS Secrets manager using the CFN resolve format stringIntentCurrently in AWS CloudFormation, using{{resolve}}does not work for custom resources. Pending the feature being
released, when the use of private resource types is not possible for the use-case, this small lib aims to allow
parsing secrets so that you can today write your CFN templates with resolve.RequirementsSadly, this means the lambda function using this library will still need IAM access directly, and cannot use the role
used by CloudFormation on create/update currently.Usagefromaws_cfn_custom_resource_resolve_parserimporthandlesecret_string=r"{{resolve:secretsmanager:mysecret:SecretString:password}}"secret_value=handle(secret_string)Documentation:https://aws-cfn-custom-resource-resolve-parser.readthedocs.io.CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.
Package: aws-cfn-kafka-admin-provider
Tool / Lib to transform a simply defined set of kafka topics and transforms the definition into an AWS CloudFormation
template that uses either EWS::Kafka::Topic or Custom::KafkaTopic (via AWS Lambda deployed in your account) to
create/updated/delete your Kafka topics.Installationpython3-mpipinstallaws_cfn_kafka_admin_providerUsageAs CLIaws-cfn-kafka-admin-provider--helpusage:aws-cfn-kafka-admin-provider[-h]-fFILE_PATH[-oOUTPUT_FILE][--format{json,yaml}][_...]positionalarguments:_optionalarguments:-h,--helpshowthishelpmessageandexit-fFILE_PATH,--file-pathFILE_PATHPathtothekafkadefinitionfile-oOUTPUT_FILE,--output-fileOUTPUT_FILEPathtofileoutput--format{json,yaml}TemplateformatAs libfromaws_cfn_kafka_admin_provider.aws_cfn_kafka_admin_providerimportKafkaStackstack=KafkaStack("/path/to/input/file.yaml")stack.render_topics()Render models# Through makefilemakedata-model# Via CLI withdatamodel-codegen--input-file-typejsonschema\--inputaws-cfn-kafka-admin-provider-schema.json\--outputaws_cfn_kafka_admin_provider/model.pyCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.
Package: aws_cfstack
OverviewGet AWS CloudFormation stack template and parameters.PrerequisitesPython >= 3.6aws-authenticator (https://pypi.org/project/aws-authenticator/) >= 2022.10.1.0Required ArgumentsOutput path (to store module artifacts)AWS authentication method (profile, iam, or sso)Conditional ArgumentsIf authenticating with named profiles:AWSCLI profile nameIf authenticating with IAM acccess key credentials:AWS access key idAWS secret access keyIf authenticating with SSO:AWS account IDAWS SSO Permission Set (role) nameAWS SSO login URLUsageInstallation:pip3installaws-cfstack# orpython3-mpipinstallaws-cfstackIn Python3 authenticating with named profiles:importaws_cfstackaws_cfstack.get_stack('</output/path>','profile',profile_name='<profile_name>')In BASH authenticating with named profiles:python[/path/to/]aws_cfstack\-o</output/path>\-mprofile\-p<profile_name>CaveatThis module creates files within the specifiedoutput_path.All stack instances whose names start with “StackSet-” are filtered out. This module was not intended to work with stack sets, although it can easily be expanded to do so.DOS line-endings (”r”) are removed from the outputs. Only Unix line-endings (”n”) are retained.
Package: awschains
EN |JAAWS ChainsAWS Chains is a wrapper for writing boto3 as method chain.DynamoChainHow to UseCreate instancedb=DynamoChain(table)Query to DynamoDBresult=(db.key_condition(Key("ForumName").eq("Amazon DynamoDB")).key_condition(Key("Subject").gte("DynamoDB Thread 1")).filter(Attr("LastPostedBy").eq("User A")).or_.filter(Attr("Views").eq(0)).limit(2).desc().query_all())