Saravanan666/pypi-org huggingface dataset:
Package: cdk-github-import
cdk-github-importImport local file assets into a new GitHub repositoryUsage# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826fromcdk_github_importimportDeployment# create a new github repository pahud/new-repo and import all files from ./lib to itDeployment(stack,"NewImport",path="./lib",owner="pahud",repository_name="new-repo",access_token=cdk.SecretValue.secrets_manager("my-github-token",json_field="token"))Private repositorySetvisibilitytoPRIVATEto create a private GitHub repository.# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826visibility:RepositoryVisibility.PRIVATE,
Package: cdk-github-role
GitHub IAM RoleAn AWS CDK construct which defines an IAM Role that can be assumed by a GitHub
Workflow.UsageGitHub OIDC ProviderIn order to define the IAM Role, you'll first need to create an OIDC provider
for GitHub in your account.These are the settings for the GitHub OIDC provider. You can create the provider
through the AWS IAM console or using theGitHubOidcProviderconstruct as
demonstrated below:Settings:URL:https://token.actions.githubusercontent.comClient IDs:sigstoreThumbprints:a031c46782e6e6c662c2c87c76da9aa62ccabd8eOr via CDK:# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826fromcdk_github_roleimportGitHubOidcProviderfromaws_cdk.coreimportApp,Stackapp=App()stack=Stack(app,"GitHubOidcProviderStack")GitHubOidcProvider(stack,"GitHubOidcProvider")app.synth()IAM Roles for RepositoriesThen, you can create an IAM role that grants a specific GitHub repository
certain permissions in the account. UseGitHubOidcProvider.forAccount()to
obtain a reference to the singleton provider.# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826fromcdk_github_roleimportGithubRole# must exist in advance.provider=GitHubOidcProvider.for_account()bar_role=GitHubRole(self,"GitHubFooBarRole",provider=provider,repository="foo/bar",role_name="FooBarGitHubRole")goo_role=GitHubRole(self,"GitHubFooGooRole",provider=provider,repository="foo/goo",role_name="GitHubFooGooRole")# now we can grant it permissions. for example:bucket.grant_read(bar_role)bucket.grant_write(goo_role)To assume this role from a GitHub Workflow, add theaws-actions/configure-aws-credentialsGitHub action step to your workflow:-name:Configure AWS Credentialsuses:aws-actions/configure-aws-credentials@9aaa1daa91b40ce855e24cd45fb39b2ca18aeaf1with:aws-region:us-east-2role-to-assume:arn:aws:iam::123456789100:role/FooBarGitHubRolerole-session-name:MySessionNameThis step will obtain temporary credentials for this role in your AWS account.SecuritySeeSecurity Issuesfor more information.LicenseThis project is licensed under the Apache-2.0 License.
Package: cdk-gitlab
cdk-gitlabHigh level CDK construct to provision GitLab integrations with AWSInstallUse the npm dist tag to opt in CDKv1 or CDKv2://forCDKv2
npminstallcdk-gitlab
or
npminstallcdk-gitlab@latest

//forCDKv1
npminstallcdk-gitlab@cdkv1Sampleimport{Provider,FargateJobExecutor,FargateRunner,JobExecutorImage}from'cdk-gitlab';constprovider=newProvider(stack,'GitlabProvider',{vpc});//createaAmazonEKSclusterprovider.createFargateEksCluster(stack,'GitlabEksCluster',{clusterOptions:{vpc,version:eks.KubernetesVersion.V1_19,},});//createadefaultfargaterunnerwithitsjobexecutorprovider.createFargateRunner();//alternatively,createtherunnerandtheexecutorindivicually.//first,createtheexecutorconstexecutor=newFargateJobExecutor(stack,'JobExecutor',{image:JobExecutorImage.DEBIAN,});//second,createtherunnerwiththetaskdefinitionoftheexecutornewFargateRunner(stack,'FargateRunner',{vpc,executor,});//TBD-createAmazonEC2runnerfortheGitLabprovider.createEc2Runner(...);});Fargate Runner with Amazon ECSOn deployment withcreateFargateRunner(), theFargate Runnerwill be provisioned in Amazon ECS with AWS Fargate andAmazon ECS Capacity Providers. By default, theFARGATEandFARGATE_SPOTcapacity providers are available for the Amazon ECS cluster and the runner and job executor will run onFARGATE_SPOT. You can specify your customclusterDefaultCapacityProviderStrategyandserviceDefaultCapacityProviderStrategyproperties from theFargateRunnerconstruct for different capacity provider strategies.Deploycdkdeploy-cGITLAB_REGISTRATION_TOKEN=<TOKEN>
Package: cdk-golden-signals-dashboard
CloudWatch Golden Signals Dashboard AWS CDK ConstructCreate Amazon CloudWatch Dashboards for monitoring CloudWatch Metrics of AWS Resources partitioned in golden signals.Latency, Traffic, Errors, SaturationYou can create tag based CloudWatch dashbord solution out of the box using this construct!Hereare some screen captures of CloudWatch dashboards created using this cdk construct.Supported Resource TypesAWS::DynamoDB::TableAWS::Lambda::FunctionAWS::RDS::DBInstanceAWS::SNS::TopicAWS::AutoScaling::AutoScalingGroupUsageIncluding in a CDK application# Example automatically generated from non-compiling source. May contain errors.fromaws_cdkimportApp,Stack,StackPropsfromconstructsimportConstructfromgolden_signals_dashboardimportGoldenSignalDashboardclassMyStack(Stack):def__init__(self,scope,id,*,description=None,env=None,stackName=None,tags=None,synthesizer=None,terminationProtection=None,analyticsReporting=None):super().__init__(scope,id,description=description,env=env,stackName=stackName,tags=tags,synthesizer=synthesizer,terminationProtection=terminationProtection,analyticsReporting=analyticsReporting)GoldenSignalDashboard(self,"dynamodbDashboard",resource_type="AWS::DynamoDB::Table",dashboard_name="myGSDashboard",resource_dimensions=[{"resource_region":"us-east-1","resources":["Table1","Table2"]}],create_alarms=True)app=App()MyStack(app,"golden-signals-sample-app-dev")app.synth()ContributingSeeCONTRIBUTINGfor more information.License SummaryThis project is licensed under the Apache-2.0 License. See theLICENSEfile for our project's licensing.
Package: cdk-gw-tools
cdk-gw-toolsCLI & other tools to help automating Conduktor GatewayCLIcdk-cli-h
usage:CDKProxyCLI[-h][--formatOUTPUT_FORMAT][--log-levelLOGLEVEL][--urlURL][--usernameUSERNAME][--passwordPASSWORD][-cCONFIG_FILE][-pPROFILE_NAME]{vclusters,interceptors,plugins}...

positionalarguments:{vclusters,interceptors,plugins}ResourcestomanagevclustersManagesvClustersinterceptorsManageinterceptorspluginsManageplugins

options:-h,--helpshowthishelpmessageandexit--formatOUTPUT_FORMAT,--output-formatOUTPUT_FORMAToutputformat--log-levelLOGLEVELSetloglevel--urlURL--usernameUSERNAME--passwordPASSWORD-cCONFIG_FILE,--config-fileCONFIG_FILEPathtotheprofilesfiles-pPROFILE_NAME,--profile-namePROFILE_NAMENameoftheprofiletousetomakeAPICallsExample config fileConfig files make it easy to switch between profiles. You can use AWS secrets manager currently to store the credentials
securely and share the config file among teammates.# Conduktor GW CLI Config filenonprod:Url:https://stg.kafka.domain.net:8888Username:adminPassword:somethingsecretprod:Url:https://kafka.prod.domain.net:8888AWSSecretsManager:SecretId:/conduktor/proxy/prod/apiuserProfileName:aws-prod
Package: cdk-home-assistant-skill
cdk-home-assistant-skillSince I am only working with Node.js and TypeScript, the Python package is currently not tested / used.
Therefore I am looking for someone to use and test it to provide feedback, if the library is actually working and if there are best practices to apply (e.g. namings, module name, etc.).Your library for creating and managing Alexa Skills via CloudFormation using AWS CDK.Table of ContentsInstallationUsageContributingLicenseChangelogInstallationNode.js / TypeScriptTo install the Node.js version of this library, use npm or yarn:npminstallcdk-home-assistant-skill# oryarnaddcdk-home-assistant-skillPythonTo install the Python version of this library, use pip:pipinstallcdk-home-assistant-skillUsageTo use this library in your AWS CDK project, import and instantiate the classes you need.You can find the API-Documentationhere.Regional restrictionsSkills can be deployed in every AWS regions, but Lambda Endpoints are restricted toNorth America:arn:aws:lambda:us-east-1:<aws_account_id>:function:<lambda_name>Europe, India:arn:aws:lambda:eu-west-1:<aws_account_id>:function:<lambda_name>Far East:arn:aws:lambda:location<aws_account_id>:function:<lambda_name>ContributingWe welcome contributions from the community. To contribute, please follow ourcontribution guidelines.LicenseThis library is licensed under the Apache 2.0 License - see theLICENSEfile for details.
Package: cdk-http-pinger
cdk-http-pingerHTTP Pinger for AWS CDKSampleimport{Pinger}from'cdk-http-pinger';constapp=newApp();conststack=newStack(app,'my-stack');constpinger=newPinger(stack,'Pinger',{url:'https://aws.amazon.com'});newCfnOutput(stack,'HttpStatus',{value:pinger.httpStatus});newCfnOutput(stack,'HtmlTitle',{value:pinger.htmlTitle});newCfnOutput(stack,'URL',{value:pinger.url});newCfnOutput(stack,'Body',{value:pinger.body});
Package: cdk-hugo-deploy
CDK-Hugo-DeployThis is an AWS CDK Construct for easily deployingHugoStatic websites to AWS S3 behind SSL/Cloudfront.UsageBefore deploying, run thehugocommand in your Hugo project to generate a built site in thepublicdirectory.Typescriptimport{App,Stack,StackProps}from'aws-cdk-lib';import{HugoDeploy}from'cdk-hugo-deploy';exportclassMyStackextendsStack{constructor(scope:Construct,id:string,props?:StackProps){super(scope,id,props);newHugoDeploy(this,'HugoDeploy',{publicDir:'path/to/hugo-project/public',domainName:'example.com'//Domainyoualreadyhaveahostedzonefor});}PythonfromconstructsimportConstructfromaws_cdkimportStackfromcdk_hugo_deployimportHugoDeployclassMyStack(Stack):def__init__(self,scope:Construct,id:str,**kwargs):super().__init__(scope,id,**kwargs)HugoDeploy(self,"HugoDeploy",public_dir="path/to/hugo-project/public",domain_name="example.com")PrerequisitesAssumes that there is already a Route53 hosted zone fordomainNamethat can belooked upWhy this construct?Other constructs for deploying Single Page Applicationis (SPA) such asCDK-SPA-Deploydon't account for how Hugo handles paths that end in/.This construct includes aCloudfront Functiontorewrite pathsto ensure/path/to/page/will request/path/to/page/index.htmlfrom the S3 Origin.ContributingPlease open anissuewith any updates/features you'd like on this
Package: cdk-iam-floyd
IAM FloydAWSIAM policy statementgenerator with fluent interface.Support for:353 Services14236 Actions1504 Resource Types1493 Condition keysThis is an early version of the package. The API will change while I implement new features. Therefore make sure you use an exact version in yourpackage.jsonbefore it reaches 1.0.0.DocumentationFind the documentation atRead the Docs.PackagesThere are two different package variants available:iam-floyd: Can be used in AWS SDK, Boto 3 or for whatever you need an IAM policy statement forcdk-iam-floyd: Integrates intoAWS CDKand extendsiam.PolicyStatementStarting with version 0.300.0, the packages are compatible with CDK v2.For CDK v1 you can use any version up to:Find them all onlibraries.io.CDK Compatibility MatrixCDKcdk-iam-floyd<= 1.151.0<= 0.285.0>= 1.152.00.286.0>= 1.158.0No compatible version!>= 2.0.0>= 0.300.0>= 2.20.0>= 0.351.0>= 2.26.0>= 0.377.02.29.xNo compatible version!>= 2.30.0>= 0.391.0LegalThe code contained in thelib/generatedfolder is generated from theAWS documentation. The class- and function-names and their description therefore are property of AWS.AWS and their services are trademarks, registered trademarks or trade dress of AWS in the U.S. and/or other countries.This project is not affiliated, funded, or in any way associated with AWS.IAM Floyd is licensed underApache License 2.0. Dependencies might be released under different licenses. Especially the bundled packagesregex-parserandcommon-substringsare released under the MIT License.
Package: cdk-iamgenerator
CDK IAM GeneratorAWS CDKconstruct helps create IAM Managed Policies and IAM Roles using JSON ConfigurationThis package is written in TypeScript and made available viaJSIIto all other supported languages. Package are available on:npmPyPIQuickstartInstall or update from npmTypeScript/Javascriptnpm i cdk-iam-generatorPythonpip install cdk-iamgeneratorUsage** TypeScript **# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826fromcdk_iam_generatorimportIamPolicyGenerator,IamRoleGeneratorIamPolicyGenerator(self,"IamPolicyGenerator",config_path="config/iam_generator_config.json",policy_path="config/policy")IamRoleGenerator(self,"IamRoleGenerator",config_path="config/iam_generator_config.json")PrerequsitesExample folder structure for Json Configuration of Roles and Policies:config
├── policy
│   ├── CodeCommitArchive.json
│   └── KMSPolicy.json
│   └── CreateServiceLinkedRoleECS.json
│   └── DeployService1.json
│   └── DeployService2.json
├── iam_generator_config.jsonPlace all the Policy Json files inside config/policy in your project root and policy file would look something like this:{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":["codecommit:CancelUploadArchive","codecommit:UploadArchive"],"Resource":"*"}]}Configure the policies and roles to be created in config/iam_generator_config.json file and would look something like this:{"policies":[{"policy_name":"CodeCommitArchive","description":"CodeCommitArchive policy","policy_file":"CodeCommitArchive.json"},{"policy_name":"KMSPolicy","description":"KMSPolicy policy","policy_file":"KMSPolicy.json"},{"policy_name":"CreateServiceLinkedRoleECS","description":"CreateServiceLinkedRoleECS policy","policy_file":"CreateServiceLinkedRoleECS.json"},{"policy_name":"DeployService1","description":"DeployService1 policy","policy_file":"DeployService1.json"},{"policy_name":"DeployService2","description":"DeployService2 policy","policy_file":"DeployService2.json"}],"roles":[{"role_name":"TestRole1","trust_service_principal":["apigateway.amazonaws.com","lambda.amazonaws.com"],"customer_managed_policies":["DeployService1","DeployService2","KMSPolicy"],"aws_managed_policies":["service-role/AmazonAPIGatewayPushToCloudWatchLogs"]},{"role_name":"TestRole2","trust_service_principal":["sns.amazonaws.com"],"trust_account_principal":["748669239283"],"customer_managed_policies":["CreateServiceLinkedRoleECS","CodeCommitArchive","KMSPolicy"],"aws_managed_policies":["service-role/AmazonAPIGatewayPushToCloudWatchLogs"]},{"role_name":"TestRole3","trust_service_principal":["ec2.amazonaws.com","sns.amazonaws.com"],"trust_account_principal":["748669239283"],"customer_managed_policies":["DeployService2","CodeCommitArchive","KMSPolicy"],"aws_managed_policies":["AWSLambdaFullAccess"]}]}Licensecdk-iam-generator is distributed under theApache License, Version 2.0.SeeLICENSEfor more information.
Package: cdk-image-moderation
cdk-image-moderationEvent-driven image moderation and notification service with AWS CDKSampleThis sample create a S3 bucket that will trigger image moderation check on object created and send notification to SNS when specific moderation labels are detected. TheSNS2Telegramcreates a Lambda function as the SNS topic subscription which fires the notification to a private Telegram chatroom with the image preview and moderation result.# Example automatically generated from non-compiling source. May contain errors.fromcdk_image_moderationimportModeration,SNS2Telegramapp=cdk.App()env={"region":process.env.CDK_DEFAULT_REGION,"account":process.env.CDK_DEFAULT_ACCOUNT}stack=cdk.Stack(app,"moderation-demo",env=env)# create the moderationmod=Moderation(stack,"Mod",moderation_labels=[ModerationLabels.EXPLICIT_NUDITY,ModerationLabels.DRUGS,ModerationLabels.TOBACCO,ModerationLabels.ALCOHOL,ModerationLabels.VIOLENCE,ModerationLabels.RUDE_GESTURES])# send notification via sns to telegramSNS2Telegram(stack,"SNS2TG",topic=mod.topic,chatid="-547476398")Deploy the CDK appexportTELEGRAM_TOKEN=<YOUR_TOKEN>
cdkdiff
cdkdeployDeploy from this repositoryexportTELEGRAM_TOKEN=<YOUR_TOKEN># run `yarn build` or `yarn watch` to generate the libcdk--applib/integ.default.jsdiff
cdk--applib/integ.default.jsdeployOn deploy completed, you will get the S3 bucket in theOutputs. Simply upload any images into this bucket and you should be able to get the notification from the Telegram chatroom.
Package: cdk-integ-runner-cwd-fix
CDK integ-runner CWD FixWhen running integ-test on python, the CWD is set to the directory which
contains your test file - not the directory which contains your cdk.json.It also blows away the PYTHONPATH, so that no longer has your cdk project.This means that your test file has no access to the stacks you create, and
you get a lot of ModuleNotFoundError when you try to import your stacks into
the test case.It also breaks the lambda (and likely other) builds which rely on a path. So,
If you're usingCode.from_asset("./lambda")you should start usingCode.from_asset(f"{os.getcwd()}/lambda")instead, after using this fix.This is likely to be applicable to other constructs that rely on a relative path.This is a workaround to fix the CWD and PYTHONPATH so that your test file
can import your stacks and run the integ tests.UsageInstallationpipinstallcdk-integ-runner-cwd-fixIn your codeThen, in your test file, add the following lines:fromcdk_integ_runner_cwd_fiximportfix_cwdfix_cwd()# You can now import your stackfrommy_cdk_project.my_stackimportMyStack# And write your test code hereapp=cdk.App()stack=MyStack(app,"TestStack")app.synth()Running testsYou'll need to set the project path in the environment variableCDK_INTEG_RUNNER_CWD:The below will set it to your current directory - which is likely to be what you need:exportCDK_INTEG_RUNNER_CWD=$(pwd)or to be explicit, or to set it to something other than the path you're currently in:exportCDK_INTEG_RUNNER_CWD=/path/to/your/cdk/projectThen, run your tests as usual:integ-runner
Package: cdk-iot-core-certificates
CDK IoT Core CertificatesAWS CDKL3 construct for managing certificates forAWS IoT CoreCloudFormation doesn't directly support creation of certificates for AWS IoT Core. This construct provides an easy interface for creating certificates through acustom CloudFormation resource. The private key is stored inAWS Parameter Store.InstallationThis package has peer dependencies, which need to be installed along in the expected version.For TypeScript/NodeJS, add these to yourdependenciesinpackage.json:cdk-iot-core-certificatesUsageimport{ThingWithCert}from'cdk-iot-core-certificates';//CreatesnewAWSIoTThingcalledthingName//Savescertsto/devices/thingName/certPemand/devices/thingName/privKey//thingNameandparamPrefixcannotstartwith'/'const{thingArn,certId,certPem,privKey}=newThingWithCert(this,'ThingWithCert',{thingName:'integrationTest',saveToParamStore:true,paramPrefix:'devices',});newCfnOutput(this,'Output-ThingArn',{value:thingArn,});newCfnOutput(this,'Output-CertId',{value:certId,});newCfnOutput(this,'Output-CertPem',{value:certPem,});newCfnOutput(this,'Output-PrivKey',{value:privKey,});
Package: cdk-kaniko
cdk-kanikoBuild images withkanikoinAWS FargateAboutcdk-kanikois a CDK construct library that allows you to build images withkanikoinAWS Fargate. Inspired from the blog post -Building container images on Amazon ECS on AWS FargatebyRe Alvarez-ParmarandOlly Pomeroy, this library aims to abstract away all the infrastructure provisioning and configuration with minimal IAM policies required and allow you to focus on the high level CDK constructs. Under the covers,cdk-kanikoleverages thecdk-fargate-run-taskso you can build the image just once or schedule the building periodically.InstallUse the npm dist tag to opt in CDKv1 or CDKv2://forCDKv2
npminstallcdk-kaniko
or
npminstallcdk-kaniko@latest

//forCDKv1
npminstallcdk-kaniko@cdkv1Sample# Example automatically generated from non-compiling source. May contain errors.constapp=newcdk.App();conststack=newcdk.Stack(app,'my-stack-dev');constkaniko=newKaniko(stack,'KanikoDemo',{context:'git://github.com/pahud/vscode.git',contextSubPath:'./.devcontainer',});//builditoncekaniko.buildImage('once');//schedulethebuildeveryday0:00AMkaniko.buildImage('everyday',Schedule.cron({minute:'0',hour:'0',}));fargate spot supportUsefargateSpotto enable theFARGATE_SPOTcapacity provider to provision the fargate tasks.# Example automatically generated from non-compiling source. May contain errors.newKaniko(stack,'KanikoDemo',{context,contextSubPath,fargateSpot:true,});NotePlease note the image building could take some minutes depending on the complexity of the providedDockerfile. On deployment completed, you can check and tail theAWS Fargatetask logs from theAWS CloudWatch Logsto view all the build output.
Package: cdk-kubesphere
cdk-kubespherecdk-kubesphereis a CDK construct library that allows you to createKubeSphereon AWS with CDK in TypeScript, JavaScript or Python.Sampleimport{KubeSphere}from'cdk-kubesphere';constapp=newcdk.App();conststack=newcdk.Stack(app,'cdk-kubesphere-demo');//deployadefaultKubeSphereserviceonanewAmazonEKSclusternewKubeSphere(stack,'KubeSphere');Behind the scene, theKubeSphereconstruct creates a default Amazon EKS cluster andKubeSphereserivce with helm chart(ks-installer) on it.View helm commandAWS CDK will helm install the `ks-installer`  on the cluster:helminstallks-installer\--repohttps://charts.kubesphere.io/test\--namespace=kubesphere-system\--generate-name\--create-namespaceKubeSphere App StoreUseappStoreto enable theKubeSphere App Storesupport.newKubeSphere(stack,'KubeSphere',{appStore:true,});View helm commandAWS CDK will helm install the `ks-installer`  on the cluster:helminstallks-installer\--setopenpitrix.enabled=true\--repohttps://charts.kubesphere.io/test\--namespace=kubesphere-system\--generate-name\--create-namespaceUsing existing Amazon EKS clustersYou are allowed to deployKubeSpherein any existing Amazon EKS cluster.constcluster=eks.Cluster.fromClusterAttributes(this,'MyCluster',{clusterName:'my-cluster-name',kubectlRoleArn:'arn:aws:iam::1111111:role/iam-role-that-has-masters-access',});//deployadefaultKubeSphereserviceontheexistingAmazonEKSclusternewKubeSphere(stack,'KubeSphere',{cluster});SeeUsing existing clustersto learn how to import existing cluster in AWS CDK.ConsoleRun the following command to create aport-forwardfrom localhost:8888 toks-console:80kubectl-nkubesphere-systemport-forwardservice/ks-console8888:80Openhttp://localhost:8888and enter the default username/password(admin/P@88w0rd) to enter the admin console.